# xhtml2pdf — card for AI agents

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

Category: Files, images and media · PyPI package `xhtml2pdf` · latest version 0.2.28 (checked 2026-11-01)
Install: `pip install xhtml2pdf`
License: Apache-2.0 (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Numbers (AgentGid data)
- Gid Score: 41.0 (#3024 of all tools, 197 of 281 in its category)
- Downloads last week: 928,112 (as of 2026-11-24), +2.1% over 4 weeks
- GitHub stars: 2,402 (as of 2026-11-24)
- Last push: 2026-11-23

## Often used with
NumPy 72.7%, Pydantic 72.7%, SQLAlchemy 72.7%, Requests 63.6%, pandas 63.6%, python-dotenv 63.6%

## Checked alternatives (same job)
- ReportLab: https://agentgid.com/tools/reportlab/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/xhtml2pdf/
- Repository: https://github.com/xhtml2pdf/xhtml2pdf

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
