Printing to cups-pdf via command line with options?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Printing to cups-pdf via command line with options?
I'm having a hard time trying to print documents to PDF via cups-pdf at the command line and get all of the nice formatting options that the GUI print spooler dialogs provide. I know how to do "lpr -P Generic-CUPS-PDF-Printer filename" to get a general file printed to a PDF, but this method clearly is missing all of the nice formatting options that get passed when using a GUI print spooler (margins, fonts, dpi, paper size, etc..). I tried to use ps to capture whatever command is being sent by the spooler but couldn't figure it out, since I'm not really sure what commands get called by the spooler. Any help would be appreciated.
Have you tried printing in the manner of Cups command-line, specifying the lpr options for margins, dpi, etc? Here is a link to the Cups documentation for command-line printing: http://www.cups.org/documentation.php/options.html
-Fnum Changes font size to this value. Default values for
font size are 6.8 in landscape mode, 6.4 in twinpage
portrait mode and 9.0 in single page portrait mode.
Try other sizes if you think that these values are
too small (or big).
Read the man page for more information about that command. a2ps will be your best bet man... Hope that helps!
The unoconv program creates a slightly nicer looking PDF using DejaVuSansMono font. Other than that, these methods are the same; producing a formatted PDF with margins, word wrapping, letter paper size, etc..
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.