Brad's Blog

Published: 2008-12-17

How to convert HTML to PDF using Python.

PDF Python web

I'm building web-based, data-driven apps using Django. Eventually (or unfortunately), I will need to generate some reports that are printer-friendly. Logically, PDF is the format for such files... so how am I going to convert my xHTML and CSS to a nice-looking PDF document?The Django Book has a whole chapter dedicated to Generating Non-HTML Content. They seem to to be fond of ReportLab ToolKit. The caveat here, though, is that you need to know a bit about the ...