Split a PDF file or rearrange its pages into a new PDF file.
Pdfsplit (formally named pdfslice) is a Python command-line tool and module for splitting and rearranging pages of a PDF document. Using it you can pick single pages or ranges of pages from a PDF document and store them in a new PDF document. To do this you describe these pages with the simple Python slice notation, e.g. 0:10 for the first ten pages, -10:0 for the last ten pages, 0::2 for all even pages, -1::-1 for all pages in reversed order, etc.
Basically, pdfsplit wrapps pyPdf, a package written by Mathieu Fenniak which contains the needed functionality in its core, but does not provide a simple method of using it easily from the command-line or from a Python module.
You can use pdfsplit as a Python module e.g. like in the following interactive Python session:
>>> from pdfsplit import splitPages >>> >>> splitPages("file.pdf", [slice(0, 1, None)]) # i.e.  written: file-split.pdf >>> splitPages("file.pdf", [slice(None, None, 2)]) # i.e. [::2] written: file-split.pdf
In addition there is a script named pdfsplit, which can be used more easily from the system command-line like this (you can see many more examples when typing pdfsplit -h on the command-line):
$ pdfsplit 0 file.pdf written: file-split.pdf $ pdfsplit ::2 file.pdf written: file-split.pdf $ pdfsplit -p -o "%(dirname)s/%(base)s-p%(indices)s%(ext)s" 3-5 file.pdf written: file-p3-5.pdf
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|pdfsplit-0.4.2-py2.5.egg (8.8 kB) Copy SHA256 Checksum SHA256||2.5||Egg||Sep 17, 2008|
|pdfsplit-0.4.2.tar.gz (23.3 kB) Copy SHA256 Checksum SHA256||–||Source||Sep 17, 2008|