weasyprint
The Awesome Document Factory
Decision gist · record as of 2026-08-14
Yes. WeasyPrint is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive BSD license. It is well-suited for developers who need to generate PDFs from HTML and CSS without embedding a full browser engine. Choose it if you want a Python-native solution for document generation; verify that its CSS layout engine meets your specific rendering requirements.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; system dependencies for cffi and fonttools may be needed depending on your platform.
- Low friction installation with a pure-Python wheel available.
- Active maintenance with recent releases and 9490 repository stars; last commit on 2026-08-13 indicates ongoing development.
License · maintenance · safety
permissive license (permissive) — BSD license (permissive) means you can use, modify, and distribute WeasyPrint with minimal restrictions; suitable for commercial and proprietary projects.
last release 2026-06-02 (73 days) · last repo commit 2026-08-13 · 9,490 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 39,652,273 downloads/mo, #691 on PyPI
Alternatives
Verify before relying
pip install weasyprint
from weasyprint import HTML
HTML('https://example.com').write_pdf('output.pdf')- Whether the CSS layout engine covers all modern CSS features needed for your use case
- Performance characteristics when rendering complex or large HTML documents
- Whether system fonts or additional font configuration is required for consistent PDF output
What it is and what it does
WeasyPrint is a visual rendering engine that converts HTML and CSS into PDF documents. It is built on Python and designed specifically for pagination and document generation, making it suitable for creating reports, invoices, and tickets from web content. Unlike full browser-based rendering engines, WeasyPrint uses a custom CSS layout engine written in Python, which aims to support web standards for printing.
The package depends on eight runtime libraries including pydyf, cffi, tinycss2, cssselect2, Pillow, fonttools, Pyphen, and tinyhtml5 for PDF generation, C bindings, CSS parsing, image handling, and font management. It supports Python 3.10 and later on both CPython and PyPy, and has been actively maintained since its initial release.
Use it for
- Generate PDF invoices and receipts from HTML templates in e-commerce or billing systems
- Create statistical reports and dashboards as downloadable PDF documents
- Export web pages or HTML content to PDF for archival or distribution
- Build ticket or certificate generation systems that render HTML to PDF
- Convert HTML-based forms or documents to print-ready PDF files
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
WeasyPrint is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive BSD license. It is well-suited for developers who need to generate PDFs from HTML and CSS without embedding a full browser engine. Choose it if you want a Python-native solution for document generation; verify that its CSS layout engine meets your specific rendering requirements.
Install
weasyprint on PyPI
Before you install
Low friction installation with a pure-Python wheel available. Active maintenance with recent releases and 9490 repository stars; last commit on 2026-08-13 indicates ongoing development.
Requires Python 3.10 or later; system dependencies for cffi and fonttools may be needed depending on your platform.
License in practice
BSD license (permissive) means you can use, modify, and distribute WeasyPrint with minimal restrictions; suitable for commercial and proprietary projects.
Quickstart
pip install weasyprint
from weasyprint import HTML
HTML('https://example.com').write_pdf('output.pdf')
Verify before relying
- Whether the CSS layout engine covers all modern CSS features needed for your use case
- Performance characteristics when rendering complex or large HTML documents
- Whether system fonts or additional font configuration is required for consistent PDF output
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 8 packagespydyfcffitinyhtml5tinycss2cssselect2PyphenPillowfonttools |
| Maintenance | Actively maintained 73 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 39,652,273 / month, #691 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Multimedia :: Graphics :: Graphics ConversionTopic :: PrintingTopic :: Text Processing :: Markup :: HTML |
Evidence: weasyprint-69.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “html to pdf conversion”
- weasyprintWeasyPrint converts HTML and CSS into PDF documents using a…
- xhtml2pdfConverts HTML and CSS to PDF documents using Python, enabling…
- pdfkitPython wrapper for wkhtmltopdf that converts HTML to PDF using the…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also django-weasyprint · pydyf · xhtml2pdf · md2pdf · pdfkit · markdown-pdf · mkdocs-with-pdf · django-wkhtmltopdf · tinycss2 · rendercv