weasyprint

Installation
SKILL.md

WeasyPrint

Pagination-first CSS engine (Python + Pango). Not headless Chrome: no JS, no RTL/bidi, print media default.

MANDATORY — read first when scope is unclear: references/resource-matrix.md

Load one flat expert lesson from references/ root (e.g. security-untrusted-html.md, css-paged-media.md). Do not open full-docs/ unless the matrix sends you there as last resort.

Before You Act

  1. Trust — Untrusted HTML/CSS? → security-untrusted-html.md + security-url-fetcher.md (before code).
  2. Runtime — CLI one-off (cli-basics.md), batch, or embedded Python (python-instantiation.md)?
  3. Output — Plain PDF, PDF/A/UA/X (pdf-*.md), Factur-X, fillable forms?
  4. Wrong tool? — JS layout, RTL, live DOM, pixel-perfect screen CSS → Puppeteer, not WeasyPrint.

Debug Bisect (wrong output)

Installs
3
GitHub Stars
1
First Seen
Jun 11, 2026
weasyprint — thedivergentai/divergent-skills