# WeasyPrint

HTML and CSS renderer for generating paginated PDF documents through Python or a command\-line interface\.

ID: Q411 · Revision: 397

Type: software · License: BSD\-3\-Clause[^intro] · Status: active

Website: https://weasyprint.org/



WeasyPrint renders HTML and CSS into paginated PDF documents for applications such as reports, invoices and books\. Its Python layout engine is designed for print\-oriented web standards rather than a full interactive browser\. It is available as open\-source software with command\-line and Python interfaces\.[^intro][^steps]

## Capabilities and substitutions

### CSS pagination — supported

Page dimensions and margins are specified through CSS @page rules\.[^cases]

Use case: Generating paginated PDFs from HTML and CSS · Platforms: Linux, macOS, Windows · Region: Version, build and integration requirements apply

### Client\-side JavaScript rendering — unsupported

The engine's documented scope excludes JavaScript and interactive browser behavior\.[^scope]

Use case: Generating paginated PDFs from HTML and CSS · Platforms: Linux, macOS, Windows · Region: Version, build and integration requirements apply

### PDF/A and PDF/UA output — limited

Variant options exist, but conformance depends on document content and is not guaranteed\.[^cases]

Use case: Generating paginated PDFs from HTML and CSS · Platforms: Linux, macOS, Windows · Region: Version, build and integration requirements apply

### [Substitute for Prince](/prince) — limited

Can cover HTML/CSS\-to\-PDF generation; engine\-specific layouts and scripting requirements need separate checks\.[^intro][^scope][^prince]

Use case: Generating paginated PDFs from HTML and CSS · Platforms: Linux, macOS, Windows · Region: Version, build and integration requirements apply

## References

[^intro]: [WeasyPrint documentation](<https://doc.courtbouillon.org/weasyprint/stable/>) — HTML/CSS pagination engine and BSD\-3\-Clause licensing (vendor; retrieved 2026-10-07T12:36:26.169Z)

[^steps]: [WeasyPrint first steps](<https://doc.courtbouillon.org/weasyprint/stable/first_steps.html>) — Platform dependencies, URL fetchers and untrusted\-input risks (vendor; retrieved 2026-10-07T12:36:26.169Z)

[^cases]: [WeasyPrint common use cases](<https://doc.courtbouillon.org/weasyprint/stable/common_use_cases.html>) — Page dimensions, PDF variants and conformance caveat (vendor; retrieved 2026-10-07T12:36:26.169Z)

[^api]: [WeasyPrint API reference](<https://doc.courtbouillon.org/weasyprint/stable/api_reference.html>) — Versioning and rendering changes (vendor; retrieved 2026-10-07T12:36:26.169Z)

[^scope]: [WeasyPrint design scope](<https://doc.courtbouillon.org/weasyprint/stable/going_further.html>) — Static paged content without JavaScript execution (vendor; retrieved 2026-10-07T12:36:26.169Z)

[^prince]: [Prince overview](<https://www.princexml.com/>) — HTML/CSS PDF generation and paged layout (vendor; retrieved 2026-10-07T12:36:26.169Z)

Source revision: https://substitutefor.net/entities/Q411?revision=397
