This is a security update (CVE-2025-68616).
We strongly recommend to upgrade WeasyPrint to the latest version if you use the default_url_fetcher function in your custom URL fetcher, or if you use the allowed_protocols parameter of the default_url_fetcher function.
Read about this release on our blog.
Security
- Always use URL fetcher for HTTP redirects
Python API
default_url_fetcher()is deprecated, use the newURLFetcherclass instead, seeURL Fetchersfor more information about URL fetchersDocumentMetadata.generate_rdf_metadatais now a method that can be overridden instead of a parameter, seeFactur-X / ZUGFeRD (Electronic Invoices)for examples to create e-invoices
Features
- #2609, #2603, #351: Refactor URL fetcher API
- #2632: Support legacy 0 value for angles
- #2627: Add font-face support to SVG
- #2646, #2255: Add font shorthand support for SVG text elements
- #2590, #1749: Honor language-specific rules for text-transform
- #2645, #2613: Improve SVG and SVG emojis rendering
- #2658, #2583: Add CLI for Factur-X / ZUGFeRD e-invoices
Bug fixes
- #2649: Refactor URL fetcher API
- #2643, #2628: Handle box-sizing: border-box in grid layout
- #2641, #1875: Process whitespace after checking all pending targets
- #2488, #2485: Preserve page groups during layout repagination
- #2642, #2631: Don’t use isolated transparency groups
- #2637: Fix repeating radial gradients rendering
- #2622: Fix validation of colors
- #2626: Share grid items rendering advancement between a box and its copies
- #2621: Correctly handle fallback values of attr()
- #2619: Fix SVG fonts
- #2629: Always define extra skip height that may be used after
- #2648: Fix numbers validation in font-feature-settings
- #2648: Fix keyword values for text-decoration-thickness
- #2661: Respect inline images when defining minimum table width
Documentation
- #2638: Update Python command for Windows installation steps
Contributors
- Guillaume Ayoub
- Jurriaan Pruis
- Mohamed Hamed
- Alexandra Usatenko
- Andrea Corna
- Aoishik Khan
- Joe
Backers and sponsors
- Spacinov
- Syslifters
- Kobalt
- Simon Sapin
- Grip Angebotssoftware
- Manuel Barkhau
- Simonsoft
- KontextWork
- Menutech
- TrainingSparkle
- Healthchecks.io
- Method B
- FieldHub
- Hammerbacher
- Yanal-Yves Fargialla
- Morntag
- Piloterr
- Xavid
- Charlie S.
- Prothesis Dental Solutions
- Kai DeLorenzo