Turn any text file into a PDF at the commandline

There are a number of ways of converting a text file into a PDF at the command line. Perhaps easiest is to "print" it to Ubuntu's PDF printer driver. The file will then be saved to the PDF folder in your /home folder. This tip uses the lp command, telling it which printer to use with the -d command switch: $ lp -d PDF textfile.txt

For more PDF manipulation tips, see also Tip 168, on page 205; Tip 189, on page 228; Tip 215, on page 249; and Tip 258, on page 298.

Avoid repetitive strain injury when using Ubuntu M 165

Was this article helpful?

0 0

Post a comment