PyPDF
Stomp*3’s PyPDF is a Python library for working with PDFs:
A Pure-Python library built as a PDF toolkit. At present, there is only one actual tool in the toolkit - the ability to grab pages from PDFs and output them into a new PDF. Like a hammer, this tool is useful for two operations: splitting and merging. You can extract individual pages from a PDF file, or selectively merge pages from multiple PDF files.
By being Pure-Python, it should run on any Python platform without any dependencies on external libraries. It can also work entirely on StringIO objects rather than file streams, allowing for PDF manipulation in memory. It is therefore a useful tool for websites that manage or manipulate PDFs.
There’s even some example code on the site to get you started.
May 8th, 2007 at 4:33 pm
And a wonderful tool it is. Handles mountains of files I have thrown at it.