Page 1 of 1

Losslessly extract pages from PDF to PDF

Posted: Tue Aug 29, 2017 4:09 pm
by peter_b
Here's a short HowTo for extracting pages from a PDF into another PDF on the commandline.

1) Install the "PDF Toolkit" (pdftk):

Code: Select all

$ apt-get install pdftk
2) Extract the pages:

Code: Select all

$ pdftk A=inputfile.pdf cat AXX-YY output output.pdf
Replace the following parameters with the ones for your use case:
  • inputfile.pdf: The source file
  • XX-YY: Pages to extract. From (XX) to (YY)
  • output.pdf: The output PDF file to create
Thanks to LinuxJournal article "Tech Tip: Extract Pages From a PDF" (by Kurt Pfeifle)