Skip to content

Releases: Kozea/WeasyPrint

v69.0

Choose a tag to compare

@github-actions github-actions released this 02 Jun 14:42

This is a security update (CVE-2026-49452).

We strongly recommend to upgrade WeasyPrint to the latest version if you use the --presentational-hints option and render untrusted HTML with restricted CSS properties.

Read about this release on our blog.

Security

  • Avoid CSS injection with HTML presentational hints.

Command-line API

  • The --srgb option has been replaced by --output-intent=srgb. Other values are possible: device-cmyk for CMYK documents with no ICC profile, or the CSS identifier of a @color-profile rule.

Python API

  • The output_intent string entry replaces the srgb boolean in default options.

Features

Bug fixes

  • #2697, #2691: Avoid endless loops in grids
  • #2709: Be less strict for gradient rasterization in tests
  • #2683: Fix rendering of emojis in SVG
  • #2688: Always describe font using absolute sizes
  • #2676: Fix inheritance for svg/symbol tags referenced by use tags
  • #2681: Add dc:description field to PDF/A metadata
  • #2680: Force first grid row rendering on empty pages
  • #2690: Compute units in gradients used in border background
  • #2689: Cut flex elements with fixed height and overflowing children
  • #2651, #2696: Fix tests on Debian
  • #2698, #2699: Fix alignment of right-to-left elements with auto width and set min/max-width
  • #2556: Apply presentational hints to svg tags
  • #2706: Handle infinite border radii
  • #2707, #2708, #2710: Get mimetypes from Python code instead of various third-party files
  • #2717, #2580, #2740: Fix table break retry after padding overflow
  • #2769: Add year in PDF/UA-2 metadata
  • #2768: Allow SVG lists of numbers to be split on + character
  • #2770: Add namespace to Document tag in PDF 2
  • #2771: Never try to render SVG use tags with external sources
  • #2774: Fix calc in logical
  • #2791: Improve management of variables

Documentation

  • #2703, #2733: Document command-line option for papersize and orientation

Contributors

  • Guillaume Ayoub
  • Nils K
  • Rob
  • Daniel Fitzpatrick
  • Elango Subramani
  • Lucie Anglade
  • Markus Mohanty
  • Tomsgu
  • arjenzorgdoc

Backers and sponsors

  • Spacinov
  • Syslifters
  • Kobalt
  • Grip Angebotssoftware
  • Simonsoft
  • Menutech
  • KontextWork
  • TrainingSparkle
  • Healthchecks.io
  • Method B
  • FieldHub
  • Hammerbacher
  • Yanal-Yves Fargialla
  • Prothesis Dental Solutions
  • Morntag
  • Xavid
  • Charlie S.
  • PDFBolt
  • Kai DeLorenzo

v68.1

Choose a tag to compare

@github-actions github-actions released this 06 Feb 15:03

Bug fixes

  • #2662: Don’t crash when SVG clip paths are not in defs tags
  • #2665: Fix position of box bounding box
  • #2663: Fix transparency with Acrobat and Edge
  • #2666: Don’t rely on random default font to define test page size
  • #2670: Fix pattern detection of URL schemes
  • #2671: Improve API compatibility between URLFetcherResponse and addinfourl
  • #2672: Fix charset for old URL fetcher requests
  • #2675, #2673: Fix calc for many properties

Contributors

  • Guillaume Ayoub

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

v68.0

Choose a tag to compare

@github-actions github-actions released this 19 Jan 14:54

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 new URLFetcher class instead, see URL Fetchers for more information about URL fetchers
  • DocumentMetadata.generate_rdf_metadata is now a method that can be overridden instead of a parameter, see Factur-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

v67.0

Choose a tag to compare

@github-actions github-actions released this 02 Dec 16:11

Read about this release on our blog.

Dependencies

  • Python 3.10+ is now needed, Python 3.9 is not supported anymore
  • tinycss2 1.5.0+ is now needed
  • fontTools 4.59.2+ is now needed

Features

  • #2560, #640, #844, #1091, #2517: Support CMYK colors, PDF/X, color profiles and light-dark() function
  • #2558, #1175: Support ::first-line, with financial support from Karte Technology
  • #2552: Support CSS layers, with financial support from Code & Co.
  • #2564, #2599, #2397: Allow page breaks in grid rows, with financial support from Ocean Recap
  • #2568, #357: Support calc() and other mathematical functions
  • #2575, #2574: Support PDF/A-1a, PDF/A-2a and PDF/A-3a
  • #2611, #2573: Support PDF/A-4e and PDF/A-4f
  • #2523: Display tofu for missing glyphs
  • #2581: Add option to disable protocols in URL resolution
  • #2570: Support rch, cap, rcap, rex, ic and ric font-relative units
  • #2547, #2140: Support "only" keyword in media queries

Bug fixes

  • #2516, #1510: Fix rendering of first line of text with nested right float
  • #2510, #1073, #2507: Avoid Pango crashes and font mismatches with @font-face rules referencing local fonts
  • #2532, #2531: Use fonttools instancer instead of deprecated mutator API
  • #2541: Fix syntax of functions
  • #2543: Allow font-related units to access @font-face fonts
  • #2525: Respect top margins and avoid overlapping footnotes for columns, with financial support from Code & Co.
  • #2536: Remove Subtype key from font descriptor
  • #2539: Fix min width for SVGs with intrinsic ratio but no intrinsic size
  • #2537, #2533: Fix order of operators when drawing SVGs
  • #2538: Don’t crash with nested unknown functions
  • #2542: Don’t crash when lh and rlh are used for line height or font size
  • #2540, #2528: Use locale encoding instead of filesystem encoding for font paths
  • #2563, #2479: Don’t avoid float collisions for atomic flex items
  • #2569: Don’t be case-sensitive for units
  • #2567, #2566: Add x-default attribute for metadata description to be compliant with PDF/A
  • #2586, #2571: Improve formatting contexts management
  • #2600: Fix SVG image aspect ratio when only width or height is specified
  • #2612, #2595: Clean block layout and fix corner cases
  • #2522: Ignore preserveAspectRatio when SVG has no viewBox
  • #2544: Allow to use a variable twice in a function
  • #2555: Fix flex gap in right-to-left context
  • #2591: Respect non-auto widths and fix padding of grid items
  • #2601: Don’t crash when tagged tables are not displayed as tables
  • #2607: Fix rendering of multiline textareas with PDF forms
  • #2106: Force variable initialization to avoid crashes during column layout
  • #2618, #2617: Fix rendering of relative grid and flex items

Documentation

Contributors

  • Guillaume Ayoub
  • Fazle Rabbi Ferdaus
  • Lucie Anglade
  • Luca Vercelli
  • ChickenF622
  • Ernie Chu
  • Mark Pullin
  • Malte Laukötter
  • Markus Mohanty
  • Yvonne Kothmeier
  • Jarom Ort
  • kuypan

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

v66.0

Choose a tag to compare

@github-actions github-actions released this 24 Jul 11:44

Read about this release on our blog.

Features

  • #2475: Add support for 'lh' and 'rlh' units
  • #2432, #2437: Report footnotes when text overflows because of orphans, with financial support from Code & Co.
  • #2256, #2466: Handle transform-origin in SVG
  • #2445: Add parameter to have additional HTTP headers for url_fetcher

Bug fixes

  • #2471, #2506, #2500, #2460, #2363, #2470, #1872, #2153, #1838, #1837, #1784, #1835, #2444, #2497, #2505, #2503, #1836, #2467: Improve PDF/UA support, with financial support from NLnet
  • #2425, #1557: Improve position of outside markers
  • #2409, #2265: Draw circles instead of rectangles when drawing dotted borders
  • #2416, #2270: Correctly split words for automatic hyphenation
  • #2439, #2426: Don’t rely on URL protocols outside URL fetcher function
  • #2433: Disable style for deprecated outline algorithm
  • #2447, #2441, #2448: Improve min- and max-content calculation, with financial support from Menutech
  • #2454, #2442, #2449: Minor fixes for flex layout
  • #2473, #2459: Include out-of-flow boxes in page layout progress, with financial support from Pathfindr
  • #2458: Replace deprecated warn logger function
  • #2494, #1856: Fix bug with bottom margins in columns
  • #2435: Make footnote calls inherit from footnotes
  • #2484, #2456: Allow to avoid page breaks after table-row-group elements
  • #2450: Draw background and borders for relative grid containers
  • #2453: Don’t advance position_y for collapsed margins of discarded children
  • #2493: Fix endless loop with CSS variables referencing each other
  • #2502: Ignore bottom margin when calculating footnote overflow

Contributors

  • Guillaume Ayoub
  • Lucie Anglade
  • Alvaro Garcia Fernandez
  • Emmanuel Ferdman
  • Gabriel Corona
  • Markus Mohanty
  • Luca Vercelli
  • Tre Huang

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Syslifters
  • Simon Sapin
  • Manuel Barkhau
  • Simonsoft
  • Menutech
  • KontextWork
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • DocRaptor
  • Yanal-Yves Fargialla
  • Method B
  • FieldHub
  • Morntag
  • Xavid
  • Kai DeLorenzo
  • Charlie S.
  • Alan Villalobos

v65.1

Choose a tag to compare

@github-actions github-actions released this 14 Apr 12:15

Bug fixes

  • #2414: Correctly handle flex columns split between pages
  • 1b24ad9: Include padding in outer size of item elements
  • #2419: Set main tag as block by default
  • #2415: Fix support of replaced block box as flex items
  • 83da2fe0: Fix margins and padding for rtl lists
  • #2429, #1076, #2431: Fix page groups

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Syslifters
  • Simon Sapin
  • Manuel Barkhau
  • Simonsoft
  • Menutech
  • KontextWork
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • DocRaptor
  • Yanal-Yves Fargialla
  • Method B
  • FieldHub
  • Morntag
  • Xavid
  • Kai DeLorenzo
  • Charlie S.
  • Alan Villalobos

v65.0

Choose a tag to compare

@github-actions github-actions released this 20 Mar 10:24

Read about this release on our blog.

Dependencies

  • CSSSelect2 0.8.0 is now needed

Features

  • #1665: Support gap properties in Flex layout, with financial support from NLnet.
  • #378, #2405: Handle @font-face unicode-range
  • #2394: Modernize and improve default user agent stylesheets

Bug fixes

Contributors

  • Guillaume Ayoub
  • Luca Vercelli

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Syslifters
  • Simon Sapin
  • Manuel Barkhau
  • Simonsoft
  • Menutech
  • KontextWork
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • DocRaptor
  • Yanal-Yves Fargialla
  • Method B
  • FieldHub
  • Morntag
  • Xavid
  • Kai DeLorenzo
  • Charlie S.
  • Alan Villalobos

v64.1

Choose a tag to compare

@github-actions github-actions released this 20 Feb 10:02

Bug fixes

  • #2368: Fix ascent and descent font values
  • #2370: Avoid endless recursion for variables in nested functions
  • #2275: Use correct containing block to render waiting children
  • #2375: Ensure that we handle text-anchor only on text content elements
  • #2090: Only create font temporary folder when adding fonts
  • #2383: Fix grid-template-areas validation and allow uppercase identifiers for grid lines

Contributors

  • Guillaume Ayoub

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Syslifters
  • Simon Sapin
  • Manuel Barkhau
  • Simonsoft
  • Menutech
  • KontextWork
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • DocRaptor
  • Yanal-Yves Fargialla
  • Method B
  • FieldHub
  • Morntag
  • Xavid
  • Kai DeLorenzo
  • Charlie S.

v64.0

Choose a tag to compare

@github-actions github-actions released this 30 Jan 16:16

Read about this release on our blog.

Features

  • #2338: Allow custom RDF metadata for PDF/A and eInvoices
  • #123, #2345: Handle small-caps synthesis
  • #2343: Support outline-offset
  • #2361: Support text-underline-offset and text-decoration-thickness
  • #2296: Don’t crash with tables with rounded corners split between pages

Bug fixes

  • #2360: Fix gradients with non-RGB colors
  • #2355, #2358: Align png emojis to the surrounding text
  • #2353: Fix alignment of SVG text with multiple nested text-anchor values
  • #2350: Fix logging restoration in capture_logs
  • #2341: Fix page groups
  • #2314: Use CSS 'image-rendering' attribute for images in SVGs
  • #2332: Fix opacity for translated SVG elements
  • #2329: Refactor text.line_break.get_log_attrs
  • #2325, #2326: Fix table overflow edge cases

Performance

Documentation

  • #2352: Add more use cases in documentation, use Furo theme

Contributors

  • Guillaume Ayoub
  • Kesara Rathnayake
  • Xavid Pretzer
  • David Tagatac
  • Ernesto Ruge
  • Niko Abeler
  • Noam Kushinsky

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Syslifters
  • Simon Sapin
  • Manuel Barkhau
  • Simonsoft
  • Menutech
  • KontextWork
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • DocRaptor
  • Yanal-Yves Fargialla
  • Method B
  • FieldHub
  • Morntag
  • Xavid
  • Kai DeLorenzo
  • Charlie S.

v63.1

Choose a tag to compare

@liZe liZe released this 10 Dec 15:52

Dependencies

  • #2297: Remove upper bounds for dependencies

Bug fixes

  • #2300, #2292: Don’t avoid floats for flex items
  • #2301, #2293: Include floats in calculation of minimum cell height
  • #2303, #2302: Set alpha even when current color channels didn’t change
  • #2306: Don’t try to increase column width when there’s no extra width
  • #2304: Don’t forget skip stack when drawing flex items
  • #2316: Don’t crash with SVG symbols
  • #2320: Fix currentcolor detection when parsing gradient color stops
  • #2322, #2289: Don’t add DLL directories when using Windows executable
  • #2323, #2305: Fix different rendering test

Performance

  • #2319: Fix memory leaks

Documentation

  • #2299: Update install instructions for Alpine
  • #2321: Add example invocation of WeasyPrint on the "Contribute" page

Contributors

  • Guillaume Ayoub
  • Jó Ágila Bitsch
  • Lucie Anglade
  • Alexander Gitter
  • Luke Cousins

Backers and sponsors

  • Spacinov
  • Kobalt
  • Grip Angebotssoftware
  • Syslifters
  • Manuel Barkhau
  • SimonSoft
  • Menutech
  • KontextWork
  • Simon Sapin
  • TrainingSparkle
  • Healthchecks.io
  • Hammerbacher
  • Advance Insight
  • Docraptor
  • Method B
  • FieldHub
  • Yanal-Yvez Fargialla
  • Morntag
  • Xavid