Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question

2 Answers 2

up vote 8 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
1  
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
    
Depending on how you installed lpr, -o may or may not work! See here: superuser.com/questions/230379/… and here: superuser.com/questions/371577/… –  zebonaut Dec 29 '11 at 22:35

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

http://localhost:631/help/options.html?TOPIC=Getting+Started&QUERY=#PAGERANGES

to see what I mean.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.