I'm running Kubuntu 18.04. I want to extract page 10 from a PDF file in the form of another PDF file. The program qpdf is supposed to do that. When I run the command

qpdf 0092434747.pdf --pages . 10 -- - > mtg.pdf

it seems to do the extraction, but there's no output; the file mtg.pdf is not created. I get the same result with (the more straightforward command)

qpdf 0092434747.pdf --pages . 10 -- mtg.pdf

What am I missing?

  • Have you tried it without the redirect? From the docs, this is an example to get pages 1-5: qpdf infile.pdf --pages . 1-5 -- outfile.pdf – ajgringo619 Dec 26 '20 at 3:01
  • You can also have a look at pdftools (disclaimer: I am the author of it) – raffaem Dec 26 '20 at 3:03

On Ubuntu I use Evince for PDFs, and I use the normal print dialog for extracting pages. In the printer selection, I have an option "Print to file". Then there is the field where I can enter which pages I want to be "printed". The result is a saved .pdf file.


The magic combination of options is qpdf --empty --pages infile.pdf 1-5 -- outfile.pdf.

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.