Wednesday, January 30, 2008

Extract several pages from one pdf file using pdftk

For example, I want to extract page 32 to page 86 from file 'test.pdf', resulting a 'new.pdf'. A 'cat' operation will be used to tackle this problem.

The example given in the official website is as such:

Split Select Pages from Multiple PDFs into a New Document
pdftk A=one.pdf B=two.pdf cat A1-7 B1-5 A8 output combined.pdf

My solution based on that is:
pdftk A=test.pdf cat A32-86 output new.pdf