I readed a lot of information about lp and lpr linux commands. Today Im trying to print 4 non-consecutive pages from a file, 2 pages per sheet.

I tryed a lot of commands:

This one prints 4 sheets, 8 pages:
lp -n 1 -d C1100 -o page-ranges=1,4,5,16 -o number-up=2 /path/to/files/1.pdf
This one prints 5 sheets, 10 pages:
lp -n 1 -d C1100 -o page-set=1,4,5,16 -o number-up=2 /path/to/files/1.pdf
This one prints 4 sheets, 8 pages:
lp -P 1,4,5,16 -n 1 -d C1100 -o number-up=2 /path/to/files/1.pdf

Now Im lost. Could You help me?

  • 2
    workaround: use pdftk to extract just the pages you want in the order you want... then print that. – derobert Dec 16 '16 at 19:13
  • mmm And that will be fast enough to consider it? (thinking about 3 pdfs, 300mb each, 150 pags each, 50% must be cutted away.... Ok let me try and play with that command. If you want post any guide about how to cut with that command, I'll thank you. – Barragán Louisenbairn Dec 19 '16 at 17:40
  • Basically it looks like pdftk input.pdf cat 1 1 2 3 5 8 13 21 output output.pdf where the Fibonacci numbers are standing in for the page numbers (yes, you can grab a page twice—that gives you two copies of page 1). – derobert Dec 19 '16 at 18:30

pdftk has already been mentioned by @derobert, but ghostscript can also be used. This guide details both methods.

  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. Please review the Help Center for more information regarding this. Thank you! – kemotep Nov 28 '18 at 21:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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