- Useful commands
- Print PDF From Command Line
- PDFtoPrinter: Command-line PDF printing
- Acrobat Wrapper
- Linux: How to print PDF files from the command line
- Command-Line Printing and Options
- Print files PDF, PRN, PCL by the Command Prompt
- Your Answer
- Linux lpstat command
- PDF Command Line Tool
- Printing from the Linux command line
- Linux print from command line pdf printer
In gedit, printing a file gives an option of printing to file where the file can be saved as a pdf. How can I do the same thing from the command line? There are more options to enscript , e.
See man enscript for all of the options. A printer with description PDF was created when you installed cups-pdf, when you use enscript with that printer your document will be sent to the PDF printer and will be printed to file, created as.
You can use unoconv in standalone mode, this means that in absence of an OpenOffice listener, it will start its own:. Pandoc is a must have swiss knife tool when it comes to conversion between various markup languages. To get you started first install pandoc converter:. Please note that you need texlive-latex-base package to be installed first, before you can convert to PDF format.
Print PDF From Command Line
Otherwise you will get a following error:. As posted above, enscript is a popular way to convert text to postscript, which can then be further converted to PDF. A similar tool, which has been around for a long time, is a2ps. It has a large number of options, including putting multiple pages on a physical page.
Install ap2s with sudo apt-get install a2ps.
PDFtoPrinter: Command-line PDF printing
Or, in the case of paps, the resulting PDF does not have a text layer. The best solution for me was to use wkthmltopdf.
It seems to be not documented, but you can easily convert text files into PDF files by using this syntax:. This generates both ps and pdf.
This accepts UTF-8 text, and supports syntax highlighting through Pango markups. Ubuntu Community Ask! Home Questions Tags Users Unanswered.
How to print a regular file to pdf from command line Ask Question.
Asked 8 years, 11 months ago. Active 2 months ago.
Viewed 51k times. Isn't there any inbuilt bash programme or command to do this? David Foerster 30k 13 13 gold badges 71 71 silver badges bronze badges.
Linux: How to print PDF files from the command line
Abel Tom Abel Tom 3 3 silver badges 14 14 bronze badges. Sabacon Sabacon Zanna Allan Allan 11k 4 4 gold badges 35 35 silver badges 50 50 bronze badges. Not what OP asked for. Welcome to Ask Ubuntu hwc!
Command-Line Printing and Options
While your post does answer the question, it's always better to include more information. For example, why is paps a better alternative?
And if paps is not installed by default, what is the command to install it?
Print files PDF, PRN, PCL by the Command Prompt
You can always edit your answer by clicking on edit right underneath the body of the answer. Otherwise you will get a following error: pandoc: pdflatex not found.
To install it: sudo apt-get install texlive-latex-base Now you can easily convert any file to pdf. Maythux Maythux Compared to the other answers, pandoc plus texlive produces bad output not respecting newlines , and is overkill and confusing to boot. Lots more packages are needed, pulling in texlive, texlive-fonts-recommended, ruby, etc. I get pandoc: Unknown writer: pdf until I install texlive-latex-base. This is on trusty.
See github. An example of using a2ps would help.
Linux lpstat command
The --delegate option seems to be needed for pdf, but the man page doesn't really help there. Zarathustra Zarathustra 21 1 1 bronze badge. This has been fixed in the latest version of paps, which is able to output selectable pdf.
See: github. You can use u2ps too.
Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
PDF Command Line Tool
Email Required, but never shown. How to create micro-interactions with react-spring: Part 1. This week, StackOverflowKnows syntactic sugar, overfit or nah, and the…. Featured on Meta.
Printing from the Linux command line
Thank you, Shog9. Thank you, Robert Cartaino. Linked 1. Related 9.
Linux print from command line pdf printer