Jonathan Bowman

Tags: html

Python PDF Generation from HTML with WeasyPrint

While there are numerous ways to handle PDF documents with Python, I find generating or editing HTML far easier and more reliable than trying to figure out the intricacies of the PDF format. Sure, there is the venerable ReportLab, and if HTML is not your cup of tea, I encourage you to look into that option. There is also PyPDF2. Or maybe PyPDF3? No, perhaps PyPDF4! Hmmm… see the problem? My best guess is PyPDF3, for what that is worth.

Modern Python Template Engines