82

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.

Dennis
  • 56,821
  • 26
  • 143
  • 139
  • 6
    I tried both answers below and for a large file (2000 pages) the performance of cpdf was far superior, so recording it here for posterity (most likely next time I Google for this answer again) – godswearhats Dec 31 '16 at 00:27

5 Answers5

141

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.

Community
  • 1
  • 1
Dennis
  • 56,821
  • 26
  • 143
  • 139
28

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.

Cody Piersall
  • 8,312
  • 2
  • 43
  • 57
johnwhitington
  • 2,308
  • 1
  • 16
  • 18
  • 4
    I tried both answers and for a large file (2000 pages) the performance of cpdf was far superior. Thanks! – godswearhats Dec 31 '16 at 00:26
  • Kudos to @johnwhitington for cpdf. pdftk no long works (for some unknown reason--I debugged several things with no success) on my macSO (now Sierra/10.12.6) machine. cpdf, and it does indeed seem to run much faster than pdftk, but I'm going from long-ago memory of pdftk's performance. – Johnny Utahh Feb 05 '18 at 21:42
  • Thanks to cpdf I was able to overcome a very nasty bug with pdftk. – Juergen Schulze Jul 18 '18 at 17:45
  • not working on windows 10, 64bit, any clue? – Noor Hossain May 06 '22 at 21:19
  • cpdf preserves the bookmarks, while pdftk preserves them. That's a big plus to me. – Clément Jul 23 '22 at 13:05
12

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.

bubla
  • 963
  • 9
  • 10
  • 1
    I am using Foxit reaxder for this purpose , just select Foxit reader PDF printer as a printer and determine page range – Igor Vuković Apr 24 '18 at 18:11
8

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
Alamakanambra
  • 5,845
  • 3
  • 36
  • 43
0

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
Chandan Kumar
  • 1,066
  • 10
  • 16