
WeasyPrint
Python library and command-line tool that renders HTML and CSS pages to PDF documents.
WeasyPrint turns HTML and CSS into PDF documents. Its layout engine is written in Python and designed for pagination, and it does not use a full browser engine. A web application calls it from Python to produce a PDF from a page, and the weasyprint command does the same from the shell.
WeasyPrint needs Pango, a text-layout system library, next to the Python package. The installation guide lists the platforms and their packages. The documentation’s “Why WeasyPrint?” section names wkhtmltopdf as one of the projects that add paged-media features to existing browsers.
Worth knowing
The docs warn that untrusted HTML or CSS can cause high memory use, endless renderings or access to local files, and advise running the service as a user with limited access or in a container. WeasyPrint can take a long time to render long documents. For many documents, the docs suggest the Python API in long-lived processes to avoid start-up costs on every run.
Identity
Rendering and deploy
- Install with
- pip, Homebrew, Linux distribution package, Windows executable6
Releases
Adoption
Sources
- 2026-11-17: links, Categories
weasyprint.org/ - 2026-11-17: links, Written in, License, GitHub stars
api.github.com/repos/Kozea/WeasyPrint - 2026-11-17: links
github.com/Kozea/WeasyPrint/blob/main/README.rst - 2026-11-17: Runtime
github.com/Kozea/WeasyPrint/blob/v70.0/README.rst - 2026-11-17: Minimum runtime, First release
pypi.org/pypi/weasyprint/json - 2026-11-17: Install with
doc.courtbouillon.org/weasyprint/stable/first_steps.html - 2026-11-17: Maintainer
www.courtbouillon.org/legal/ - 2026-11-17: Current major version, Last release
api.github.com/repos/Kozea/WeasyPrint/releases - 2026-11-17: Contributors
api.github.com/repos/Kozea/WeasyPrint/contributors - 2026-11-17: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/pypi.org/packages/weasyprint