Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I need to make lpr print just the first page of my document, however it continues to print everything. Itried these commands:

lpr -P <myprinter> -o page-ranges=1 <myfile>
lp -d <myprinter> -o page-ranges=1 <myfile>
lp -d <myprinter> P 1 <myfile>
share|improve this question
Which version of CUPS? – Kurt Pfeifle Jan 14 '11 at 19:24

Appears it would be: lp -p 1

(plus whatever else you'll need to pass to lp to get it to print what you want to print).

share|improve this answer
It is probably for an ancient version of the cups, or even not for a cups printing system version. In the current cups, printing happens with the lpr command and not with lp, and the -p flag has different meaning. – peterh Jun 25 at 2:29

It depends on the CUPS version. To the googlers of the future:

Yes, the -o page-ranges=2 should work.

The probable reason behind your problem is that there are previous projects left in your queue. You can check this in the CUPS administration panel on http://localhost:631 . Go to the printer managing and delete all of the tasks there is yet in the printer queue.

And so, you won. Problem solved. Page-ranges work. We are happy. Good luck!

share|improve this answer

Your Answer


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.