Rendering HTML as PDF in Python

Weasyprint is the best python tool I’ve found to convert HTML to PDF.  Well-maintained, frequent releases, great documentation, with a solid rendering engine.  But for some reason they’re really hard to find when doing a google search for “python html pdf converter”.  So here’s my best effort at giving them a little googlejuice: use Weasyprint!

Ironically, the top hit for the search “python html pdf converter”, xhtml2pdf, is a real mess. Poorly maintained, unclear ownership, sparsely documented.

There’s no reason to use anything except Weasyprint to convert HTML documents to PDF from Python!