Printing pages from 7 to 17 by lpr
--------------------------------------------------
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Dreamlands
--
Chapters
00:00 Printing Pages From 7 To 17 By Lpr
00:13 Accepted Answer Score 22
00:24 Answer 2 Score 3
00:39 Answer 3 Score 1
01:01 Thank you
--
Full question
https://superuser.com/questions/75553/pr...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#unix #lpr
#avk47
Hire the world's top talent on demand or became one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Dreamlands
--
Chapters
00:00 Printing Pages From 7 To 17 By Lpr
00:13 Accepted Answer Score 22
00:24 Answer 2 Score 3
00:39 Answer 3 Score 1
01:01 Thank you
--
Full question
https://superuser.com/questions/75553/pr...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#unix #lpr
#avk47
ACCEPTED ANSWER
Score 22
lpr -P myprinter -o page-ranges=7-17
where myprinter
is the name of your printer
ANSWER 2
Score 3
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.
ANSWER 3
Score 1
man lp
has the -P
option for page range:
-P page-list
Specifies which pages to print in the document. The list can contain a list of numbers and ranges (#-#) separated by commas,
e.g., "1,3-5,16". The page numbers refer to the output pages and not the document's original pages - options like "number-up"
can affect the numbering of the pages.
Here is a full command I use often:
lp -P 5-22 -o media=A4 -o number-up=2 -o sides=two-sided-long-edge -o fit-to-page R-ints.pdf