Split a PDF in two

PdfPdftk

Pdf Problem Overview


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.

Pdf Solutions


Solution 1 - Pdf

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.

Solution 2 - Pdf

This can be done with cpdf:

cpdf in.pdf 1-12 -o out.pdf

cpdf in.pdf 13-end -o out.pdf

Or, to split into 12-page-sized chunks:

cpdf in.pdf -split -chunk 12 -o out%%%.pdf

Disclosure: I am the author of cpdf.

Solution 3 - Pdf

As my distribution doesn't package cpdf neither pdftk, I had to search for another solution and found the easiest one - in order to split PDFs, one can simply "print" page ranges from them, selecting PDF as an output (instead of a printer). This is for sure available in GNOME by default, but I am pretty sure that it is available in other DEs too.

Solution 4 - Pdf

I know it is not exactly answer to your question, but trying to split pdf page by page got me here, so:

pdftk file.pdf burst output file-%d.pdf

And on Windows, you can easily install pdftk with chocolatey:

choco install pdftk

Solution 5 - Pdf

If you are not looking for a programatic way.

  1. Open the pdf in google chrome.
  2. ctrl+P (print).
  3. Select option "Save as PDF".
  4. Select the number of pages, you want in 1st PDF and save foo.pdf
  5. Repeat the above steps and select the number of pages you want in baar.pdf

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionDennisView Question on Stackoverflow
Solution 1 - PdfDennisView Answer on Stackoverflow
Solution 2 - PdfjohnwhitingtonView Answer on Stackoverflow
Solution 3 - PdfbublaView Answer on Stackoverflow
Solution 4 - PdfAlamakanambraView Answer on Stackoverflow
Solution 5 - PdfChandan KumarView Answer on Stackoverflow