There are lots of PDF related packages for Python. One of my favorite is PyPDF2. You can use it to extract metadata, rotate pages, split or merge PDFs and more. It's kind of a Swiss-army knife for existing PDFs. In this article we will learn how to extract basic information about a PDF using PyPDF2 […]
I do a lot of PDF report creation with Python using Reportlab. Occasionally I'll throw PyPDF in as well. So I'm always on the lookout for other mature Python PDF tools. PDFDocument isn't exactly mature, but it's kind of interesting. The PDFDocument project is actually a wrapper for Reportlab. You can get it on github. […]
At my job, we sometimes need to write a PDF to memory instead of disk because we need to merge an overlay on to it. By writing to memory, we can speed up the process since we won't have the extra step of writing the file to disk and than reading it back into memory […]
While researching PDF libraries for Python, I stumbled across another little project called metaPDF. According to its website, metaPDF is a lightweight Python library optimized for metadata extraction and insertion, and it is a fast wrapper over the excellent pyPdf library. It works by quickly searching the last 2048 bytes of the PDF before parsing […]
Today I learned that the pyPDF project is NOT dead, as I had originally thought. In fact, it's been forked into PyPDF2 (note the slightly different spelling). There's also a possibility that someone else has taken over the original pyPDF project and is actively working on it. You can follow all that over on reddit […]
Today we'll be looking at a simple PDF generation library called pyfpdf, a port of FPDF which is a php library. This is not a replacement for Reportlab, but it does give you more than enough to create simple PDFs and may meet your needs. Let's take a look and see what it can do! […]