How to print specific pages from the command line

printing

Is there a way to send a PDF file (or files) to the printer via the command line, but print only, say, odd-numbered pages? E.g., lpr -{some option} *.pdf Or perhaps {some command to get odd-numbered pages} *.pdf | lpr. This would be faster than opening each file, opening the Print dialogue, and telling it to print pages 1, 3, 5, 7, 9… The idea is to print all odd pages, then I can print the even numbered pages on the other side of the paper.

Best Answer

Try

lpr -o page-set=odd <file>
lpr -o page-set=even <file>

You can find the documentation of this and other lpr options in the cups documentation.

Related Question