Split a PDF in two

Dennis picture Dennis · Jul 21, 2013 · Viewed 57.8k times · Source

How do you easily split a large PDF into two (or more) separate PDFs?

Say we have foo-bar.pdf, section foo is from page 1-12 and section bar is from page 13 till the end. I want foo-bar.pdf split into foo.pdf and bar.pdf.

Answer

Dennis picture Dennis · Jul 21, 2013

You can use pdftk, it's a handy tool for manipulating PDF documents.

sudo apt-get --yes install pdftk
pdftk foo-bar.pdf cat 1-12 output foo.pdf
pdftk foo-bar.pdf cat 13-end output bar.pdf

You can use this method to split a PDF in N ways, or to remove pages.

For example, to remove page 13:

pdftk in.pdf cat 1-12 14-end output out.pdf

Or use it to rotate pages and many other things, see man pdftk.

Installation is also possible by downloading a binary (Windows, OS X, Linux) or using Homebrew.