Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can you print pages from 7 to 17 by lpr?

share|improve this question
up vote 13 down vote accepted
lpr -P myprinter -o page-ranges=7-17

where myprinter is the name of your printer

share|improve this answer
How did you find the information about the flag: - page-ranges=7-17 .? It is not in my manual in Ubuntu. – Masi Dec 2 '09 at 20:03
I just Googled for "lpr page range" - and lo - first result – Sathya Dec 2 '09 at 21:42
i think the command should be -o page-ranges=7-17 not - page-ranges=7-17. can't test since i have no printer, but you don't give your source so i can't look to see if the typo is yours or theirs. – quack quixote Dec 2 '09 at 23:11
@~quack That's correct. Not sure how I missed typing the missing letter. – Sathya Dec 3 '09 at 9:22
@Masi Standard options are described in CUPS online documentation. And from the same page : "Printer-specific options are also available and can be listed using the lpoptions command: lpoptions -p printer -l". – Skippy le Grand Gourou May 12 at 10:26

Masi, the command IS documented on your Ubuntu box, in the online-help for CUPS. Visit


to see what I mean.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .