Losslessly extract pages from PDF to PDF

Step-by-Step descriptions of how to do things.
Post Reply
User avatar
peter_b
Chatterbox
Posts: 338
Joined: Tue Nov 12, 2013 2:05 am

Losslessly extract pages from PDF to PDF

Post 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)
Post Reply