Using pdftk it is possible to extract page ranges from a pdf using pdftk a.pdf cat 124-end output b.pdf dont_askI have a bunch of huge PDFs with about 500 pages and over 100 MB, is it possible to automatically split those in pieces of maximal 5 MB? 
Splitting large PDF into small files
command line;pdf;pdftk
I found this python script called smpdf that has this feature. This script is written in German (some of it) but it's easy enough to figure out what it's doing and how to use it. It requires PyPdf.Installation & SetupFirst download the script:svn checkout http://smpdf.googlecode.com/svn/trunk/ smpdfThen download & install PyPdf:wget http://pybrary.net/pyPdf/pyPdf-1.13.tar.gztar zxvf pyPdf-1.13.tar.gzcd pyPdf-1.13sudo python setup.py installcd ../smpdfNext I downloaded a sample PDF file from example5.com. Specifically this file.Usage of smpdf:[ERROR] Ungltiger Aufruf===========================================================================                         PDF Manipulator               (c) 2007 by Franz Buchinger---------------------------------------------------------------------------   Verwendung:   pdfm split 5 file.pdf       Datei file.pdf in PDFs mit jeweils 5 Seiten splitten   pdfm chunk 3 file.pdf       Datei file.pdf in max. 3 MB grosse PDFs splitten   pdfm burst file.pdf         Jede Einzelseite in file.pdf in ein PDF schreiben   pdfm merge f1.pdf f2.pdf    f1.pdf und f2.pdf in ein PDF mergen   pdfm merge output.pdf dir   mergt alle PDFs im Verzeichnis dir in die Datei output.pdf   pdfm info f1.pdf            zeigt Dokumentinformationen (Groesse, Seitenzahl, Titel,..) zu f1.pdf anThe sample file we downloaded is as follows:$ pdfinfo chickering04a.pdf Title:          chickering04a.dviCreator:        dvips(k) 5.94a Copyright 2003 Radical Eye SoftwareProducer:       AFPL Ghostscript 8.0CreationDate:   Fri Oct  8 17:53:18 2004ModDate:        Fri Oct  8 17:53:18 2004Tagged:         noPages:          44Encrypted:      noPage size:      612 x 792 pts (letter)File size:      386372 bytesOptimized:      noPDF version:    1.3So this sample file has 44 pages and is 386KB in size. Using the following command we can split the PDF up into chunk files that are ~0.1MB (~100KB).python pdfsm.py chunk 0.1 chickering04a.pdfWhich produces the following output:    ======== NEUES PDF ========    Seite:0, Groesse: 12696    Seite:1, Groesse: 11515    Seite:2, Groesse: 17209    Seite:3, Groesse: 17411    Seite:4, Groesse: 17060    Seite:5, Groesse: 26303======== NEUES PDF ========    Seite:9, Groesse: 31014    Seite:10, Groesse: 27666    Seite:11, Groesse: 18548......======== NEUES PDF ========    Seite:40, Groesse: 19059    Seite:41, Groesse: 20912    Seite:42, Groesse: 17685    Seite:43, Groesse: 5362Our directory now contains the following files:$ ls -ltotal 1220-rw-rw-r-- 1 saml saml  74471 May 12 09:23 chickering04a-chunk001.pdf-rw-rw-r-- 1 saml saml  78673 May 12 09:23 chickering04a-chunk002.pdf-rw-rw-r-- 1 saml saml  89259 May 12 09:23 chickering04a-chunk003.pdf-rw-rw-r-- 1 saml saml  92569 May 12 09:23 chickering04a-chunk004.pdf-rw-rw-r-- 1 saml saml  96953 May 12 09:23 chickering04a-chunk005.pdf-rw-rw-r-- 1 saml saml  86390 May 12 09:23 chickering04a-chunk006.pdf-rw-rw-r-- 1 saml saml  90815 May 12 09:23 chickering04a-chunk007.pdf-rw-rw-r-- 1 saml saml  92094 May 12 09:23 chickering04a-chunk008.pdf-rw-rw-r-- 1 saml saml  78909 May 12 09:23 chickering04a-chunk009.pdf-rw-rw-r-- 1 saml saml 386372 May 12 08:30 chickering04a.pdf-rwxrwxr-x 1 saml saml   9324 May 12 07:41 pdfsm.pydrwxr-xr-x 4 saml saml   4096 May 12 08:25 pyPdf-1.13-rw-rw-r-- 1 saml saml  35699 May 12 08:24 pyPdf-1.13.tar.gzI used this hacked command to show the stats of the generated PDF files:$ printf %7s%6s\n # pages size; for i in chickering04a-chunk00*; do pdfinfo $i | egrep File size|Pages|cut -d: -f2;done|sed 's/[\t ]\+/ /'|paste - -# pages  size 5       74471 bytes 3       78673 bytes 3       89259 bytes 5       92569 bytes 4       96953 bytes 3       86390 bytes 5       90815 bytes 6       92094 bytes 5       78909 bytes