a2pdf is a software that transforms plain text in ASCII format to PDF. It is equipped with line/page numbering and Perl syntax highlighting for enhanced readability.
The command-line tool allows you to specify various options, such as setting the title of the PDF or even including an image as part of the page header. You can also enable or disable line/page numbering and even add Perl syntax highlighting to your code.
One of the standout features is the ability to add margins to your PDF, allowing you to define a non-printable area around the text. You can set individual margins or apply the same margin to all sides. Additionally, you can choose the font, font size, and line spacing to use in your document.
You can also specify the page height and width in points, with default values set to A4. By default, the tool reads the input file from STDIN, but you can also pass the input file as a parameter.
There are some requirements to use the tool. You need to have the PDF::API2 Perl module installed, and Perl::Tidy is needed for a syntax highlighting feature. If you decide to include images in the page header, you will also need to install the File::Type and Image::Size modules.
One limitation to keep in mind is that on RedHat 9 systems, you must set the LANG environment variable to C. Also, you may face issues with syntax highlighting if your input Perl code uses source filter modules - in this case, syntax highlighting may not work correctly.
Overall, I found the a2pdf project to be a useful tool for converting text to PDF and customizing the output. The various options available make it easy to tailor the PDF to your preferences.
Version 1.13: N/A