Sunday, May 15, 2011

Converting Text to PDF

Converting text to PDF is handy and can be a shortcut around the complexities of generating pdf output when your needs are simple. One way to do it is using "enscript" and "ps2pdf" as in the following command:

enscript --no-header --landscape -q -p - my_text_file.txt|ps2pdf - my_pdf_file.pdf

If you need enscript, you can get it from:

Building it yourself is straightforward. Once you untar/unzip the download, you can use "./config --help" to get help in special configurations if you need it.