Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

a light solution to convert text to pdf in Linux [closed]

Tags:

linux

pdf

People also ask

How do I convert a TXT file to PDF in Linux?

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.

How do I convert a TXT file to PDF?

Open Acrobat or launch Acrobat online services from any web browser. Select the Convert To PDF tool. Drag and drop your Notepad file into the converter. You can also choose Select a File to manually locate your document.


One way would be to use enscript followed by ps2pdf

enscript -p file.ps file.txt
ps2pdf file.ps file.pdf