Linux Print From Command Line Pdf Printer

Linux print from command line pdf printer

By using our site, you acknowledge that you have read and understand our Cookie Policy , Privacy Policy , and our Terms of Service.

Alberto vazquez-figueroa oceano pdf converter

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.

Useful commands

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.

Linux print from command line pdf printer

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.

Nike brand identity guidelines 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.

Acrobat Wrapper

Asked 8 years, 11 months ago. Active 2 months ago.

Linux print from command line pdf printer

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.

Your Answer

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.

Linux print from command line pdf printer

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.

Linux print from command line pdf printer

See: github. You can use u2ps too.

Linux print from command line pdf printer

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

Hot Network Questions. Question feed. Ask Ubuntu works best with JavaScript enabled.