When you have a bunch of text documents to maintain, there are advantages in converting them into PDF format. For example, PDF is good for printing because PDF documents have pre-defined layout. Besides, with PDF format, there is less risk hat the documents are accidentally modified.
To convert a text file to PDF format, you can follow two-step procedures.
First, you need to install two prerequisite packages.
On Debian, Ubuntu or Linux Mint:
On Fedora, CentOS/RHEL:
On Arch Linux:
Convert a Text File to PDF Format
Once all prerequisites are installed, follow these two steps to generate a PDF file from a text file.
First, convert a text file to Postscript format by using enscript command-line tool.
Finally convert the generated postscript file to a PDF file.
Subscribe to Ask Xmodulo
Do you want to receive Linux related questions & answers published at Ask Xmodulo? Enter your email address below, and we will deliver our Linux Q&A straight to your email box, for free. Delivery powered by Google Feedburner.
Did you find this tutorial helpful? Then please be generous and support Xmodulo!