Comparison
django-weasyprint vs django-wkhtmltopdf vs html2pdf4doc vs xhtml2pdf
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Django WeasyPrint integration
Maintained. Last release 2 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and contributor spread.
pip install django-weasyprintConverts HTML to PDF using wkhtmltopdf.
Likely abandoned. No release or commit for years (last release over 4 years ago).
pip install django-wkhtmltopdfPython client for HTML2PDF4Doc JavaScript library.
Actively maintained. Last release 6 days ago, commits in 9 of the last 26 weeks. A safe choice.
pip install html2pdf4docPDF generator using HTML and CSS
Actively maintained. Last release 9 days ago, commits in 9 of the last 26 weeks. A safe choice.
pip install xhtml2pdfIn short
- django-wkhtmltopdf looks abandoned: avoid it for new projects.
- xhtml2pdf is the most used: 4M downloads a month, 18× more than django-weasyprint.
- Maintenance is comparable: html2pdf4doc 77, xhtml2pdf 74, django-weasyprint 53 on Pythie’s Index.
- html2pdf4doc is growing fastest: downloads +77% over the last month.
- html2pdf4doc is the newcomer: first released May 2025.
- Safe default for a new project: xhtml2pdf.
Side by side
| Metric | django-weasyprint | django-wkhtmltopdf | html2pdf4doc | xhtml2pdf |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 53 | 22 |