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 sidedlpr -o sides=two-sided-short-edge filename
is two sides, flipping along the short edge of the pagelpr -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
Pretty-printing: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