save as pdf in linux
Solution 1
text2pdf - This is the latest version of text2pdf, and offers a number of improvements over version 1.0. As you might be able to guess from the name, text2pdf converts text files to PDF.
http://www.eprg.org/pdfcorner/text2pdf/
Solution 2
For the best way would be to install cups-pdf
and add a virtual printer. More information here on Arsgeek
Another way is to Select "Print to File" and select .ps or .pdf
Solution 3
Beside all the *2pdf
and *topdf
tools you might find in your /usr/bin
directory, a "Print to PDF file" should be present in your DE of choice. In KDE, for example, the kprinter
applet will do this. The plus side of this approach, is that the formatting has already been taken care of, by the application that you will choose to print from, and you might be able to drive that application from the command line with DBUS (or DCOP).
Solution 4
OpenOffice Word Processor is typically used in GUI form, but it does have an "Export to PDF" feature. See this answer for hints on how to do it in a scripted form for command line use.
Related videos on Youtube
Comments
-
Neilvert Noval over 1 year
I have seen how simple it is for Mac OS to generate pdf from a document without additional software to install.
But I am looking for this functionality in Linux.
One scenario, for example, if I have myDocument.txt that contain an article, how can I convert this into pdf? My next question is, assuming that myDocument.txt is a 3-paged document, will it generate a 3-page continuous pdf and not just 3 separate pdfs?
Any tools for linux that does this? (GUI is fine, but commandline is preferable)-
ajreal over 13 yearsthere is some tools like html2pdf, ghost script to pdf, but you still need the additional software
-
Matthew Flaschen over 13 yearsThere are many ways to do this on Linux, including PDF printers. What distribution are you using? There's a very good chance everything you need is in the repository.
-
-
Neilvert Noval over 12 yearsin some way, this is helpful to me. I haven't known "Export to PDF" until I read your answer. +1 point for you. Thanks.