Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

xhtml2pdf

Turns HTML and CSS into PDF in pure Python, for invoices, reports and other templates.

Files, images and mediaPYPI

GitHub

1. License

License from PyPI license expression.

github.com/xhtml2pdf/xhtml2pdf

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What xhtml2pdf does

Turns HTML and CSS into PDF in pure Python, for invoices, reports and other templates.

xhtml2pdf popularity

41 / 100
Gid Score, #3024 overall
928K
downloads a week, pypi
2,402
GitHub stars
xhtml2pdf: downloads per weekPyPI, xhtml2pdf 926,741
xhtml2pdf: GitHub starsxhtml2pdf/xhtml2pdf 2,402

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How xhtml2pdf is used

  • AgentGid editors added xhtml2pdf to the catalog as a well-known library for PDF. In our scan it appears in 11 public GitHub projects, 0 of them set up for AI coding agents, so there is too little project data to rank it against the tools people use most.
  • The most used alternative in our scan is ReportLab (25 projects).
  • Projects that use it most often also use NumPy (72.7%), Pydantic (72.7%), SQLAlchemy (72.7%).

Often used with

In 72.7% of its projects
In 72.7% of its projects
In 72.7% of its projects
In 63.6% of its projects
In 63.6% of its projects
In 63.6% of its projects
In 63.6% of its projects
In 54.5% of its projects

More about xhtml2pdf

Funding
  • Patreon: https://patreon.com/xhtml2pdf
  • Own page: https://blockstream.info/address/bc1qmr0skzwx5scyvh2ql28f7gfh6l65ua250qv227

See all

More in Files, images and media

Alternatives

xhtml2pdf This page

Apache-2.0Gid 41928K/wk

ReportLab

Python library for generating PDFs and graphics programmatically.

BSDGid 7025.4M/wk

Compare xhtml2pdf with another tool

Get started

Install it.

pip install xhtml2pdf

No step-by-step start for xhtml2pdf yet: we have not written its hand-checked card.