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