xhtml2pdf/xhtml2pdf
A library for converting HTML into PDFs using ReportLab observed · 2026-08-28
Health v2 · maintenance only
67/100
- Activity 99
- Release rhythm 8
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 5588
- days_rel: 556
- days_push: 7
- n_releases_24m: 1
Adoption not part of the score
2387 stars · 655 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
xhtml2pdf is a pure-Python library that converts HTML and CSS (HTML5, CSS 2.1, partial CSS 3) into PDF documents using ReportLab, html5lib, and pypdf. It lets developers with web skills generate PDF templates without learning new rendering technologies.
Use cases
- convert html to pdf in python
- generate pdf invoices from html templates
- create pdf reports from web templates
- render html css to pdf server-side
- generate printable pdf documents from django or flask
- produce pdf files without learning reportlab
When to choose
- you or your team already know HTML and CSS and want to author PDF templates quickly
- you need a pure-Python, platform-independent PDF generation solution
- you want a lightweight alternative to headless browsers for PDF rendering
When to avoid
- you need full modern CSS 3 layout support (flexbox, grid) - consider WeasyPrint or a headless browser
- you need pixel-perfect rendering of complex JavaScript-driven pages
- you require very high-fidelity print typography
Facets
library · maturity active
pdf templating pdf web-development files developer-tools python cross-platform html-to-pdf reportlab css document-generation pure-python html
2 sources
- readme: https://github.com/xhtml2pdf/xhtml2pdf · fetched 2026-08-28 · f96f3a0594ad
- registry_pypi: https://pypi.org/pypi/xhtml2pdf/json · fetched 2026-08-29 · 67a3549fbba0
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| xhtml2pdf/xhtml2pdf | main | 67 |
For agents
markdown · JSON · MCP: product_card(name="xhtml2pdf/xhtml2pdf")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem