Useful command-line options in CUPS

I often have to go back to CUPS documentation. I don't use the command line tools nowadays, so I manage to forget the command line options from one time to another. That's enough to write a blog post about that, in order to have a short note to refer to 🙂

Printing in landscape mode is:
lpr -o landscape filename

How many sides?
lpr -o sides=one-sided filename is one sided
lpr -o sides=two-sided-short-edge filename is two sides, flipping along the short edge of the page
lpr -o sides=two-sided-long-edge filename is two sides, flipping along the long edge of the page

Printing N pages per page (n-up or number-up printing) is:
lpr -o number-up=N filename

Page fitting is:
lpr -o fit-to-page filename

lpr -o prettyprint filename
This one is especially useful for those that use C/C++ but, unfortunately, of limited use for those who use Perl. XEmacs' prettyprinting is very good for that, by the way.

Print N copies:
lpr -#N filename


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.