# Kozea/WeasyPrint

The awesome document factory

Repository: https://github.com/Kozea/WeasyPrint
Canonical: https://ross.abutalabs.com/products/weasyprint
Homepage: https://weasyprint.org
Language: Python
License: BSD-3-Clause
License Family: permissive
Topics: python, css, pdf, html, converter, weasyprint
Last push: 2026-08-25T12:52:02+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 74, longevity 100
- inputs: {"age_days": 5503, "days_push": 8, "days_rel": 92, "gap_med": 44.0, "n_releases_24m": 11}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 9531, forks 863 (observed 2026-08-28T04:10:31.735157+00:00)

## What it is
WeasyPrint is a Python visual rendering engine for HTML and CSS that exports documents to PDF, with a CSS layout engine designed for pagination. It lets web developers generate reports, invoices, tickets, and books from HTML/CSS without relying on a browser rendering engine.

## Use cases
- convert html to pdf in python
- generate invoices from html templates
- create statistical reports as pdf
- print html with css paged media
- generate tickets with barcodes from html
- render a book with table of contents to pdf

## When to choose
- you want to generate paginated PDFs from HTML and CSS in Python
- you need print-specific CSS features like page headers, footers, and multiple layouts
- you want a pure-Python alternative to headless browsers for PDF generation

## When to avoid
- you need pixel-perfect rendering of complex JavaScript-driven web pages
- you need a general-purpose browser or screenshot tool rather than PDF output
- you require a rendering engine based on WebKit or Gecko

## Facets
- artifact type: library
- maturity: active
- function: pdf, templating, image-processing
- domain: pdf, web-development, files
- platform: python, cross-platform, cli
- tags: html-to-pdf, css-paged-media, rendering-engine, print-to-pdf, document-generation

## Member repositories
- Kozea/WeasyPrint (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:31.735157+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:21:59.046803+00:00, confidence not recorded.
  - readme: https://github.com/Kozea/WeasyPrint (fetched 2026-08-28T04:10:31.735157+00:00, sha ae1935687715)
  - homepage: https://weasyprint.org (fetched 2026-08-29T08:21:41.338605+00:00, sha 9b7e1728f2da)
  - registry_pypi: https://pypi.org/pypi/weasyprint/json (fetched 2026-08-29T08:21:41.347854+00:00, sha 1d7f1e4213c1)
- Data as of 2026-08-30T08:39:29.467469+00:00.
