Api Reference
API Reference
=============
.. currentmodule:: weasyprint
This page is for WeasyPrint |version|. See :doc:changelog </changelog> for
older versions.
API Stability
-------------
Everything described here is considered “public”: this is what you can rely
on. We will try to maintain backward-compatibility, and we really often do, but
there is no hard promise.
Anything else should not be used outside of WeasyPrint itself. We reserve
the right to change it or remove it at any point. Use it at your own risk,
or have dependency to a specific WeasyPrint version.
Versioning
----------
WeasyPrint provides frequent major releases, and minor releases with only bug
fixes. Versioning is close to what many browsers do, including Firefox and
Chrome: big major numbers, small minor numbers.
Even if each version does not break the API, each version does break the way
documents are rendered, which is what really matters at the end. Providing
minor versions would give the illusion that developers can just update
WeasyPrint without checking that everything works.
Unfortunately, we have the same problem as the other browsers: when a new
version is released, most of the user's websites are rendered exactly the same,
but a small part is not. And the only ways to know that, for web developers,
are to read the changelog and to check that their pages are correctly rendered.
More about this choice can be found in
issue #900_.
.. _#900: https://github.com/Kozea/WeasyPrint/issues/900
Command-line API
----------------
.. autofunction:: weasyprint.__main__.main(argv=sys.argv)
Python API
----------
.. autoclass:: HTML(input, kwargs)
:members:
.. autoclass:: CSS(input, kwargs)
.. autoclass:: Attachment(input, kwargs)
.. autodata:: DEFAULT_OPTIONS
.. module:: weasyprint.document
.. autoclass:: Document
:members:
.. autoclass:: DocumentMetadata()
:members:
.. autoclass:: Page()
:members:
:exclude-members: paint
.. module:: weasyprint.urls
.. autoclass:: URLFetcher
:members:
:member-order: bysource
.. autoclass:: URLFetcherResponse
.. autoclass:: FatalURLFetchingError
.. module:: weasyprint.text.fonts
.. autoclass:: FontConfiguration()
.. module:: weasyprint.css.counters
.. autoclass:: CounterStyle()
Supported Features
------------------
URLs
~~~~
WeasyPrint can read normal files, HTTP, FTP and data URIs_. It will follow
HTTP redirects but more advanced features like cookies and authentication
are currently not supported, although a custom :ref:URL fetcher can help.
<URL Fetchers>
.. _data URIs: https://en.wikipedia.org/wiki/Data_URI_scheme
HTML
~~~~
Supported HTML Tags
+++++++++++++++++++
Many HTML elements are implemented in CSS through the HTML5User-Agent stylesheet_.
Some elements need special treatment:
* The `<base> element, if present, determines the base for relative URLs.
* CSS stylesheets can be embedded in <style> elements or linked by
<link rel=stylesheet> elements.
* <img>, <embed> or <object> elements accept images either
in raster formats supported by Pillow_ (including PNG, JPEG, GIF, ...)
or in SVG. SVG images are not rasterized but rendered
as vectors in the PDF output.
HTML presentational hints_ are not supported by default, but most of them can
be supported:
* by using the --presentational-hints CLI parameter, or
* by setting the presentational_hints parameter of the HTML.render or
HTML.write_* methods to True.
Presentational hints include a wide array of attributes that direct styling in
HTML, including font color and size, list attributes like type andstart, various table alignment attributes, and others. If the document
generated by WeasyPrint is missing some of the features you expect from the
HTML, try to enable this option.
.. _User-Agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css
.. _presentational hints: https://www.w3.org/TR/html5/rendering.html#presentational-hints
.. _Pillow: https://python-pillow.org/
Stylesheet Origins
++++++++++++++++++
HTML documents are rendered with stylesheets from three origins:
* The HTML5 user agent stylesheet_ (defines the default appearance
of HTML elements);
* Author stylesheets embedded in the document in <style> elements
or linked by <link rel=stylesheet> elements;
* User stylesheets provided in the API.
Keep in mind that user stylesheets have a lower priority than author
stylesheets in the cascade_, unless you use !important_ in declarations
to raise their priority.
.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css
.. _cascade: https://www.w3.org/TR/CSS21/cascade.html#cascading-order
.. _!important: https://www.w3.org/TR/CSS21/cascade.html#important-rules
PDF
~~~
In addition to text, raster and vector graphics, WeasyPrint’s PDF files
can contain hyperlinks, bookmarks, attachments and forms.
Hyperlinks will be clickable in PDF viewers that support them. They can
be either internal, to another part of the same document (eg.<a href="#pdf">) or external, to an URL. External links are resolved
to absolute URLs: <a href="/blog-articles/"> on the CourtBouillon website
would always point to https://www.courtbouillon.org/blog-articles/ in PDF
files.
PDF bookmarks are also called outlines and are generally shown in a
sidebar. Clicking on an entry scrolls the matching part of the document
into view. By default all <h1> to <h6> titles generate bookmarks,PDF bookmarks
but this can be controlled with _.)
Attachments are related files, embedded in the PDF itself. They can be
specified through <link rel=attachment> elements to add resources globally
or through regular links with <a rel=attachment> to attach a resource that
can be saved by clicking on said link. The title attribute can be used as
description of the attachment.
Generated documents can also include PDF forms, using the appearance: auto
CSS property or the --pdf-forms CLI option.
The generation of PDF/A and PDF/UA documents is supported. However, the
generated documents are not guaranteed to be valid, and users have the
responsibility to check that they follow the rules listed by the related
specifications.
Fonts
~~~~~
WeasyPrint can use any font that Pango_ can find installed on the system. Fonts are
automatically embedded in PDF files and are subset by default to only include the glyphs
used in the PDF. Subsetting is done with hb-subset_ when available on the system,
or by the slower fontTools_ library as a fallback.
Pango_ always uses Fontconfig_ to access fonts, even on Windows and macOS. You
can list the available fonts thanks to the fc-list command, and know which
font is matched by a given pattern thanks to fc-match. Copying a font file
into the ~/.local/share/fonts directory is generally enough to install a
new font. WeasyPrint should support the major font formats handled by HarfBuzz_.
WeasyPrint follows the Fontconfig_ configuration of the system. This default
configuration is often useful for many cases: font fallbacks for missing glyphs, aliases
for standard font families like "serif" or "monospace", colored variants for emojis,
etc. But some of these default rules can sometimes interfere with CSS rules, and it may
be interesting to disable them if you need to tweak details about font management.
When a Unicode code point is not supported by a font and its fallbacks, the font’s .notdef glyph_ is
displayed instead, and a warning is displayed in logs. Because of the way Pango handles
this case, the .notdef glyph may be rendered with an incorrect width (advance), but the layout of
the other glyphs is correct. Text search and selection work as if the glyph was
available.
.. _hb-subset: https://harfbuzz.github.io/harfbuzz-hb-subset.html
.. _fontTools: https://fonttools.readthedocs.io/en/latest/
.. _Pango: https://www.pango.org/
.. _Fontconfig: https://www.freedesktop.org/wiki/Software/fontconfig/
.. _HarfBuzz: https://harfbuzz.github.io/
.. _.notdef glyph: https://en.wikipedia.org/wiki/Notdef_glyph
CSS
~~~
WeasyPrint supports many of the CSS specifications_ written by the W3C. You
will find in this chapter a comprehensive list of the specifications or drafts
with at least one feature implemented in WeasyPrint.
.. _CSS specifications: https://www.w3.org/Style/CSS/current-work
CSS Level 2 Revision 1
++++++++++++++++++++++
The CSS Level 2 Revision 1_ specification, best known as CSS 2.1, is prettyAcid2
well supported by WeasyPrint. Since version 0.11, it passes the famous
Test_.
The CSS 2.1 features listed here are not supported:
* On tables: visibility: collapse_.font matching algorithm
* Minimum and maximum height_ on table-related boxes.
* Minimum and maximum width_ and height_ on page-margin boxes.
* Conforming _. Currently font-familybi-directional text
is passed as-is to Pango.
* Right-to-left or _.System colors
* _ and system fonts_. The former are deprecated in CSS Color
Module Level 3_.
.. _CSS Level 2 Revision 1: https://www.w3.org/TR/CSS21/
.. _Acid2 Test: https://www.webstandards.org/files/acid2/test.html
.. _empty-cells: https://www.w3.org/TR/CSS21/tables.html#empty-cells
.. _visibility\: collapse: https://www.w3.org/TR/CSS21/tables.html#dynamic-effects
.. _width: https://www.w3.org/TR/CSS21/visudet.html#min-max-widths
.. _height: https://www.w3.org/TR/CSS21/visudet.html#min-max-heights
.. _font matching algorithm: https://www.w3.org/TR/CSS21/fonts.html#algorithm
.. _Bi-directional text: https://www.w3.org/TR/CSS21/visuren.html#direction
.. _System colors: https://www.w3.org/TR/CSS21/ui.html#system-colors
.. _system fonts: https://www.w3.org/TR/CSS21/fonts.html#propdef-font
.. _CSS Color Module Level 3: https://www.w3.org/TR/css-color-3/
To the best of our knowledge, everything else that applies to the
print media is supported. Please report a bug if you find this list
incomplete.
Selectors Level 3 / 4
+++++++++++++++++++++
With the exceptions noted here, all Selectors Level 3_ are supported.
PDF is generally not interactive. The :hover, :active, :focus,:target and :visited pseudo-classes are accepted as valid but
never match anything.
Everything in Selectors Level 4_ is supported, except:
- :dir,
- input pseudo-classes (:valid, :invalid…),
- column selector (||, :nth-col(), :nth-last-col()).
.. _Selectors Level 3: https://www.w3.org/TR/selectors-3/
.. _Selectors Level 4: https://www.w3.org/TR/selectors-4/
CSS Text Module Level 3 / 4
+++++++++++++++++++++++++++
The CSS Text Module Level 3_ and CSS Text Module Level 4_ are working
drafts defining "properties for text manipulation" and covering "line breaking,
justification and alignment, white space handling, and text transformation".
Among their features, some are already included in CSS 2.1, sometimes with
missing or different values (text-indent, text-align,letter-spacing, word-spacing, text-transform, white-space).
New properties defined in Level 3 are supported:
- the overflow-wrap property replacing word-wrap;
- the break-all value of the word-break property (see #1153_);
- the full-width value of the text-transform property; and
- the start, end and justify-all values of the text-align property;
- the text-align-last and text-justify properties; and
- the tab-size property.
Properties controlling hyphenation_ are supported by WeasyPrint:
- hyphens,
- hyphenate-character,
- hyphenate-limit-chars, and
- hyphenate-limit-zone.
To get automatic hyphenation, you to set it to auto
and have the lang HTML attribute set to one of the languagessupported by Pyphen_.
.. code-block:: html
<!doctype html>
<html lang=en>
<style>
html { hyphens: auto }
</style>
…
Automatic hyphenation can be disabled again with the manual value:
.. code-block:: css
html { hyphens: auto }
a[href]::after { content: ' [' attr(href) ']'; hyphens: manual }
The other features provided by CSS Text Module Level 3_ are not
supported:
- the line-break property;
- the match-parent value of the text-align property;
- the text-indent and hanging-punctuation properties.
The other features provided by CSS Text Module Level 4_ are not
supported:
- the text-space-collapse and text-space-trim properties;
- the text-wrap, wrap-before, wrap-after and wrap-inside
properties;
- the text-align property with an alignment character;
- the pre-wrap-auto value of the white-space property; and
- the text-spacing property.
.. _#1153: https://github.com/Kozea/WeasyPrint/issues/1153
.. _supported by Pyphen: https://github.com/Kozea/Pyphen/tree/main/pyphen/dictionaries
.. _hyphenation: https://www.w3.org/TR/css-text-3/#hyphenation
.. _CSS Text Module Level 3: https://www.w3.org/TR/css-text-3/
.. _CSS Text Module Level 4: https://www.w3.org/TR/css-text-4/
CSS Fonts Module Level 3 / 4
++++++++++++++++++++++++++++
The CSS Fonts Module Level 3_ is a candidate recommendation describing "how
font properties are specified and how font resources are loaded dynamically".
WeasyPrint supports the font-size, font-stretch, font-style andfont-weight properties, coming from CSS 2.1.
WeasyPrint also supports the following font features added in Level 3:
- font-kerning,
- font-variant-ligatures,
- font-variant-position,
- font-variant-caps,
- font-variant-numeric,
- font-variant-east-asian,
- font-feature-settings, and
- font-language-override.
font-family is supported. The string is given to Pango that tries to find a
matching font in a way different from what is defined in the recommendation,
but that should not be a problem for common use.
The shorthand font and font-variant properties are supported.
WeasyPrint supports the @font-face rule.
WeasyPrint does not support the @font-feature-values rule and the
values of font-variant-alternates other than normal andhistorical-forms.
From CSS Fonts Module Level 4_ we only support thefont-variation-settings property enabling specific font variations.
.. _CSS Fonts Module Level 3: https://www.w3.org/TR/css-fonts-3/
.. _CSS Fonts Module Level 4: https://www.w3.org/TR/css-fonts-4/
CSS Paged Media Module Level 3
++++++++++++++++++++++++++++++
The CSS Paged Media Module Level 3_ is a working draft including features for
paged media "describing how:
- page breaks are created and avoided;
- the page properties such as size, orientation, margins, border, and padding
are specified;
- headers and footers are established within the page margins;
- content such as page counters are placed in the headers and footers; and
- orphans and widows can be controlled."
All the features of this draft are available, including:
- the @page rule and the :left, :right, :first and :blank#93
selectors;
- the page margin boxes;
- the page-based counters (with known limitations _);
- the page size, bleed and marks properties;
- the named pages.
.. _CSS Paged Media Module Level 3: https://drafts.csswg.org/css-page-3/
.. _#93: https://github.com/Kozea/WeasyPrint/issues/93
CSS Generated Content for Paged Media Module
++++++++++++++++++++++++++++++++++++++++++++
The CSS Generated Content for Paged Media Module_ (GCPM) is a working draft
defining "new properties and values, so that authors may bring new techniques
(running headers and footers, footnotes, page selection) to paged media".
Page selectors_ are supported by WeasyPrint. You can select pages according
to their position in the document:
.. code-block:: css
@page :nth(3) { background: red } / Third page /
@page :nth(2n+1) { background: green } / Odd pages /
@page :nth(1 of chapter) { background: blue } / First pages of chapters /
You can also use running elements_ to put HTML boxes into the page margins
(but the start parameter of element() is not supported).
Footnotes_ are supported. You can put a box in the footnote area using thefloat: footnote property. Footnote markers and footnote calls can be
defined using the ::footnote-marker and ::footnote-call
pseudo-elements. You can also change the way footnotes are displayed using thefootnote-display property (compact is not supported), and influence
over the rendering of difficult pages with footnote-policy.
.. _CSS Generated Content for Paged Media Module: https://www.w3.org/TR/css-gcpm-3/
.. _Page selectors: https://www.w3.org/TR/css-gcpm-3/#document-page-selectors
.. _running elements: https://www.w3.org/TR/css-gcpm-3/#running-elements
.. _Footnotes: https://www.w3.org/TR/css-gcpm-3/#footnotes
CSS Generated Content Module Level 3
++++++++++++++++++++++++++++++++++++
The CSS Generated Content Module Level 3_ is a working draft helping "authors
[who] sometimes want user agents to render content that does not come from the
document tree. One familiar example of this is numbered headings
[…]. Similarly, authors may want the user agent to insert the word "Figure"
before the caption of a figure […], or replacing elements with images or other
multimedia content."
Named strings_ are supported by WeasyPrint. You can define strings related to
the first or last element of a type present on a page, and display these
strings in page borders. This feature is really useful to add the title of the
current chapter at the top of the pages of a book for example.
The named strings can embed static strings, counters, cross-references, tag
contents and tag attributes.
.. code-block:: css
@top-center { content: string(chapter) }
h2 { string-set: chapter "Current chapter: " content() }
Cross-references_ retrieve counter or content values from targets (anchors or
identifiers) in the current document:
.. code-block:: css
a::after { content: ", on page " target-counter(attr(href), page) }
a::after { content: ", see " target-text(attr(href)) }
In particular, target-counter() and target-text() are useful when itan example
comes to tables of contents (see _).
You can also control PDF bookmarks_ with WeasyPrint. Using thebookmark-level, bookmark-label and bookmark-state properties, you
can add bookmarks that will be available in your PDF reader.
Bookmarks have already been added in the WeasyPrint's user agent stylesheet_,
so your generated documents will automatically have bookmarks on headers (from<h1> to <h6>). But for example, if you have only one top-level <h1>
and do not wish to include it in the bookmarks, add this in your stylesheet:
.. code-block:: css
h1 { bookmark-level: none }
Leaders_ are also supported:
.. code-block:: css
li a::after {
content: ' ' leader(dotted) ' ' target-counter(attr(href), page);
}
The other features of this module are not implemented:
- quotes (content: *-quote);
.. _CSS Generated Content Module Level 3: https://www.w3.org/TR/css-content-3/
.. _Quotes: https://www.w3.org/TR/css-content-3/#quotes
.. _Named strings: https://www.w3.org/TR/css-content-3/#named-strings
.. _Cross-references: https://www.w3.org/TR/css-content-3/#cross-references
.. _an example: https://github.com/Kozea/WeasyPrint/pull/652#issuecomment-403276559
.. _PDF bookmarks: https://www.w3.org/TR/css-content-3/#bookmark-generation
.. _user agent stylesheet: https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua.css
.. _Leaders: https://www.w3.org/TR/css-content-3/#leaders
CSS Color Module Level 4 / 5
++++++++++++++++++++++++++++
The CSS Color Module Level 4_ is a recommendation defining "CSS properties which allow
authors to specify the foreground color and opacity of the text content of an element".
Its main goal is to specify how colors are defined, including color keywords and many
color notations including #rgba, rgb(), hsl(), hwb(), lab(), etc.
The standard color() function gives a common way to define colors giving their color
space. Opacity and alpha compositing are also defined in this document.
This recommendation is fully implemented in WeasyPrint, except the deprecated
System Colors.
The CSS Color Module Level 5_ is a working draft adding "color modification functions,
custom color spaces (ICC profiles), contrast-color(), light-dark() anddevice-cmyk()" to level 4.
WeasyPrint supports the light-dark() and device-cmyk() properties, and the@color-profile at-rule.
WeasyPrint does not support the color-mix() and contrast-color() properties.
.. _CSS Color Module Level 4: https://www.w3.org/TR/css-color-4/
.. _CSS Color Module Level 5: https://www.w3.org/TR/css-color-5/
CSS Transforms Module Level 1
+++++++++++++++++++++++++++++
The CSS Transforms Module Level 1_ working draft "describes a coordinate
system within each element is positioned. This coordinate space can be modified
with the transform property. Using transform, elements can be translated,
rotated and scaled in two or three dimensional space."
WeasyPrint supports the transform and transform-origin properties, and
all the 2D transformations (matrix, rotate, translate,translateX, translateY, scale, scaleX, scaleY, skew,skewX, skewY).
WeasyPrint does not support the transform-style, perspective,perspective-origin and backface-visibility properties, and all the 3D
transformations (matrix3d, rotate3d, rotateX, rotateY,rotateZ, translate3d, translateZ, scale3d, scaleZ).
.. _CSS Transforms Module Level 1: https://drafts.csswg.org/css-transforms-1/
CSS Backgrounds and Borders Module Level 3
++++++++++++++++++++++++++++++++++++++++++
The CSS Backgrounds and Borders Module Level 3_ is a candidate recommendation
defining properties dealing "with the decoration of the border area and with
the background of the content, padding and border areas".
The border part_ of this module is supported, as it is already included in
the the CSS 2.1 specification.
WeasyPrint supports the background part_ of this module (allowing multiple
background layers per box), including the background, background-color,background-image, background-repeat, background-attachment,background-position, background-clip, background-origin andbackground-size properties.
WeasyPrint supports the rounded corners part_ of this module, including
the border-radius property.
WeasyPrint supports the border images part_ of this module, including theborder-image, border-image-source, border-image-slice,border-image-width, border-image-outset and border-image-repeat
properties.
WeasyPrint supports the box shadow part_ of this module, including thebox-shadow property. Blur should be avoided, as it is approximated using
gradients, which may be rendered poorly by PDF readers, and are limited in
some extreme situations (very large or uneven border radii, very large blur
regions, etc.) Real Gaussian blur requires raster images that are not adapted
to WeasyPrint’s vector PDF output.
.. _CSS Backgrounds and Borders Level 3: https://www.w3.org/TR/css-backgrounds-3/
.. _border part: https://www.w3.org/TR/css-backgrounds-3/#borders
.. _background part: https://www.w3.org/TR/css-backgrounds-3/#backgrounds
.. _rounded corners part: https://www.w3.org/TR/css-backgrounds-3/#corners
.. _border images part: https://www.w3.org/TR/css-backgrounds-3/#border-images
.. _box shadow part: https://www.w3.org/TR/css-backgrounds-3/#box-shadow
CSS Image Values and Replaced Content Module Level 3 / 4
++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The Image Values and Replaced Content Module Level 3_ is a candidate
recommendation introducing "additional ways of representing 2D images, for
example as a list of URIs denoting fallbacks, or as a gradient", defining
"several properties for manipulating raster images and for sizing or
positioning replaced elements" and "generic sizing algorithm for replaced
elements".
The Image Values and Replaced Content Module Level 4_ is a working draft on
the same subject.
The linear-gradient(), radial-gradient() andrepeating-radial-gradient() properties are supported as background images.
The the url() notation is supported, but the image() notation is
not supported for background images.
The object-fit and object-position properties are supported.
The from-image and snap values of the image-resolution property are
not supported, but the resolution value is supported.
The image-rendering and image-orientation properties are supported.
.. _Image Values and Replaced Content Module Level 3: https://www.w3.org/TR/css-images-3/
.. _Image Values and Replaced Content Module Level 4: https://www.w3.org/TR/css-images-4/
CSS Box Sizing Module Level 3
+++++++++++++++++++++++++++++
The CSS Box Sizing Module Level 3_ is a candidate recommendation extending
"the CSS sizing properties with keywords that represent content-based
'intrinsic' sizes and context-based 'extrinsic' sizes."
The new property defined in this document is implemented in WeasyPrint:box-sizing.
The min-content, max-content and fit-content() sizing values are
not supported.
.. _CSS Box Sizing Module Level 3: https://www.w3.org/TR/css-sizing-3/
CSS Overflow Module Level 3
+++++++++++++++++++++++++++
The CSS Overflow Module Level 3_ is a working draft containing "the features
of CSS relating to scrollable overflow handling in visual media."
The overflow property is supported, as defined in CSS2. overflow-x,overflow-y, overflow-clip-margin, overflow-inline andoverflow-block are not supported.
The text-overflow, block-ellipsis, line-clamp, max-lines andcontinue properties are supported.
.. _CSS Overflow Module Level 3: https://www.w3.org/TR/2020/WD-css-overflow-3-20200603/
CSS Values and Units Module Level 3 / 4
+++++++++++++++++++++++++++++++++++++++
The CSS Values and Units Module Level 3_ defines various units and
keywords used in "value definition field of each CSS property".
The CSS Values and Units Module Level 4_ adds many new units, unit types and math
functions.
The initial and inherit CSS-wide keywords are supported, but theunset keyword is not supported.
Quoted strings, URLs and numeric data types are supported.
Font-relative lengths (em, ex, ch, cap, ic, lh),
viewport-relative lengths (vw, vh, vi, vb, vmin, vmax),
absolute lengths (cm, mm, q, in, pt, pc, px), angles
(rad, grad, turn, deg), resolutions (dpi, dpcm, dppx, x)
are supported.
Unspecified page-relative units (pvw, pvh…) are also supported. They are
relative to the whole page size (including page margins), while all the other units are
relative to the page area size (without page margins).
The attr() functional notation is allowed in the content andstring-set properties.
All the mathematical functions (calc()…) are supported.
.. _CSS Values and Units Module Level 3: https://www.w3.org/TR/css3-values/
.. _CSS Values and Units Module Level 4: https://www.w3.org/TR/css-values-4/
CSS Multi-column Layout Module
++++++++++++++++++++++++++++++
The CSS Multi-column Layout Module_ "describes multi-column layouts in CSS, a
style sheet language for the web. Using functionality described in the
specification, content can be flowed into multiple columns with a gap and a
rule between them."
Simple multi-column layouts are supported in WeasyPrint. Features such as
constrained height, spanning columns or column breaks are not
supported. Pagination and overflow are not seriously tested.
The column-width and column-count properties, and the columns
shorthand property are supported.
The column-gap, column-rule-color, column-rule-style andcolumn-rule-width properties, and the column-rule shorthand property
are supported.
The break-before, break-after and break-inside properties are
supported.
The column-span property is supported for direct children of columns.
The column-fill property is supported, with a column balancing algorithm
that should be efficient with simple cases.
.. _CSS Multi-column Layout Module: https://www.w3.org/TR/css-multicol-1/
CSS Fragmentation Module Level 3 / 4
++++++++++++++++++++++++++++++++++++
The CSS Fragmentation Module Level 3_ "describes the fragmentation model that
partitions a flow into pages, columns, or regions. It builds on the Page model
module and introduces and defines the fragmentation model. It adds
functionality for pagination, breaking variable fragment size and orientation,
widows and orphans."
The CSS Fragmentation Module Level 4_ is a working draft on the same subject.
The break-before, break-after and break-inside properties are
supported for pages, but not for columns and regions. page-break-*
aliases as defined in CSS2 are supported too.
The orphans and widows properties are supported.
The box-decoration-break property is supported, but backgrounds are always
repeated and not extended through the whole box as it should be with 'slice'
value.
The margin-break property is supported.
.. _CSS Fragmentation Module Level 3: https://www.w3.org/TR/css-break-3/
.. _CSS Fragmentation Module Level 4: https://www.w3.org/TR/css-break-4/
CSS Custom Properties for Cascading Variables Module Level 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The CSS Custom Properties for Cascading Variables Module Level 1_ "introduces
cascading variables as a new primitive value type that is accepted by all CSS
properties, and custom properties for defining them."
The custom properties and the var() notation are supported.
.. _CSS Custom Properties for Cascading Variables Module Level 1: https://www.w3.org/TR/css-variables/
CSS Text Decoration Module Level 3 / 4
++++++++++++++++++++++++++++++++++++++
The CSS Text Decoration Module Level 3_ "contains the features of CSS
relating to text decoration, such as underlines, text shadows, and emphasis
marks."
The CSS Text Decoration Module Level 4_ is a working draft on the same subject.
The text-decoration-line, text-decoration-style,text-decoration-color, text-decoration-thickness andtext-underline-offset properties are supported. The text-decoration
shorthand is also supported.
The other properties (text-underline-position, text-emphasis-*,text-shadow) are not supported.
.. _CSS Text Decoration Module Level 3: https://www.w3.org/TR/css-text-decor-3/
.. _CSS Text Decoration Module Level 4: https://www.w3.org/TR/css-text-decor-4/
CSS Flexible Box Layout Module Level 1
++++++++++++++++++++++++++++++++++++++
The CSS Flexible Box Layout Module Level 1_ "describes a CSS box model
optimized for user interface design", also known as "flexbox".
This module works for simple use cases but is not deeply tested.
All the flex-, align-, justify-* and order properties are
supported. The flex and flex-flow shorthands are supported too.
.. _CSS Flexible Box Layout Module Level 1: https://www.w3.org/TR/css-flexbox-1/
CSS Grid Layout Module Level 2
++++++++++++++++++++++++++++++
The CSS Grid Layout Module Level 2_ "defines a two-dimensional grid-based layout
system, optimized for user interface design".
This module works for simple cases, but has some limitations. Here are
non-exhaustive lists of supported/unsupported features.
Supported:
- display: grid,
- grid-auto-, grid-template- and other grid-* properties,
- grid and other grid-* shorthands,
- flexible lengths (fr unit),
- line names,
- grid areas,
- auto rows and auto columns,
- z-index,
- repeat(X, *),
- minmax(),
- align- and justify- alignment properties,
- gap and *-gap properties for gutters,
- dense auto flow,
- order,
- margins, borders, padding on grid containers and grid items,
- fragmentation between rows.
Unsupported or untested:
- display: inline-grid,
- auto content size for grid containers,
- grid-auto-flow: column,
- subgrids,
- repeat(auto-fill, ) and repeat(auto-fit, ),
- auto margins for grid items,
- span with line names,
- span for flexible tracks,
- safe and unsafe alignments,
- baseline alignment,
- grid items with intrinsic size (images),
- distribute space beyond limits,
- grid items larger than grid containers,
- min-width, max-width, min-height, max-height on grid items,
- complex min-content and max-content cases,
- absolutely positioned and floating grid items,
- fragmentation in rows.
.. _CSS Grid Layout Module Level 2: https://www.w3.org/TR/css-grid-2/
CSS Logical Properties and Values Module Level 1
++++++++++++++++++++++++++++++++++++++++++++++++
The CSS Logical Properties and Values Module Level 1_ "defines how to map between
flow-relative and physical terms."
All the logical properties and shorthands based on start, end, block andinline are supported. But, as writing-mode is not supported, the block andinline axes always correspond to the vertical and horizontal axes.
.. _Logical Properties and Values Module Level 1: https://www.w3.org/TR/css-logical-1/
CSS Basic User Interface Module Level 4
+++++++++++++++++++++++++++++++++++++++
The CSS Basic User Interface Module Level 4_ "enables authors to style user
interface related properties and values."
The outline-width, outline-style, outline-color properties and theoutline shorthand are supported. The outline-offset property is also
supported.
The resize, cursor, caret- and nav- properties are not
supported.
The appearance property is supported. When set to auto, it displays
form fields as PDF form fields (supported for text inputs, check boxes, text
areas, and select only).
The accent-color property is not supported.
.. _CSS Basic User Interface Module Level 4: https://www.w3.org/TR/css-ui-4/
---
Changelog
Changelog
=========
Version 69.0
------------
Released on 2026-06-02.
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.
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:
* #2357 <https://github.com/Kozea/WeasyPrint/issues/2357>_,#2700 <https://github.com/Kozea/WeasyPrint/pull/2700>
_:#1194 <https://github.com/Kozea/WeasyPrint/issues/1194>
Support logical properties
* _,#2702 <https://github.com/Kozea/WeasyPrint/pull/2702>
_:#2686 <https://github.com/Kozea/WeasyPrint/issues/2686>
Support viewport units
* _:#2735 <https://github.com/Kozea/WeasyPrint/issues/2735>
Detect redirection loops early in URL fetcher
* _,#2737 <https://github.com/Kozea/WeasyPrint/pull/2737>
_:#2636 <https://github.com/Kozea/WeasyPrint/issues/2636>
Support SVG transform angle units
* _,#2720 <https://github.com/Kozea/WeasyPrint/pull/2720>
_,#2773 <https://github.com/Kozea/WeasyPrint/pull/2773>
_:#2631 <https://github.com/Kozea/WeasyPrint/issues/2631>
Use HTML parsers for presentational hints
* _,#2778 <https://github.com/Kozea/WeasyPrint/pull/2778>
_,#2785 <https://github.com/Kozea/WeasyPrint/issues/2785>
_,#2788 <https://github.com/Kozea/WeasyPrint/pull/2788>
_:
Allow users to set PDF output intent
Bug fixes:
* #2697 <https://github.com/Kozea/WeasyPrint/issues/2697>_,#2691 <https://github.com/Kozea/WeasyPrint/pull/2691>
_:#2709 <https://github.com/Kozea/WeasyPrint/pull/2709>
Avoid endless loops in grids
* _:#2683 <https://github.com/Kozea/WeasyPrint/issues/2683>
Be less strict for gradient rasterization in tests
* _:#2688 <https://github.com/Kozea/WeasyPrint/pull/2688>
Fix rendering of emojis in SVG
* _:#2676 <https://github.com/Kozea/WeasyPrint/issues/2676>
Always describe font using absolute sizes
* _:#2681 <https://github.com/Kozea/WeasyPrint/pull/2681>
Fix inheritance for svg/symbol tags referenced by use tags
* _:#2680 <https://github.com/Kozea/WeasyPrint/issues/2680>
Add dc:description field to PDF/A metadata
* _:#2690 <https://github.com/Kozea/WeasyPrint/issues/2690>
Force first grid row rendering on empty pages
* _:#2689 <https://github.com/Kozea/WeasyPrint/issues/2689>
Compute units in gradients used in border background
* _:#2651 <https://github.com/Kozea/WeasyPrint/issues/2651>
Cut flex elements with fixed height and overflowing children
* _,#2696 <https://github.com/Kozea/WeasyPrint/pull/2696>
_:#2698 <https://github.com/Kozea/WeasyPrint/issues/2698>
Fix tests on Debian
* _,#2699 <https://github.com/Kozea/WeasyPrint/pull/2699>
_:#2556 <https://github.com/Kozea/WeasyPrint/issues/2556>
Fix alignment of right-to-left elements with auto width and set min/max-width
* _:#2706 <https://github.com/Kozea/WeasyPrint/issues/2706>
Apply presentational hints to svg tags
* _:#2707 <https://github.com/Kozea/WeasyPrint/issues/2707>
Handle infinite border radii
* _,#2708 <https://github.com/Kozea/WeasyPrint/pull/2708>
_,#2710 <https://github.com/Kozea/WeasyPrint/pull/2710>
_:#2717 <https://github.com/Kozea/WeasyPrint/issues/2717>
Get mimetypes from Python code instead of various third-party files
* _,#2580 <https://github.com/Kozea/WeasyPrint/issues/2580>
_,#2740 <https://github.com/Kozea/WeasyPrint/pull/2740>
_:#2769 <https://github.com/Kozea/WeasyPrint/pull/2769>
Fix table break retry after padding overflow
* _:#2768 <https://github.com/Kozea/WeasyPrint/issues/2768>
Add year in PDF/UA-2 metadata
* _:#2770 <https://github.com/Kozea/WeasyPrint/pull/2770>
Allow SVG lists of numbers to be split on + character
* _:#2771 <https://github.com/Kozea/WeasyPrint/pull/2771>
Add namespace to Document tag in PDF 2
* _:#2774 <https://github.com/Kozea/WeasyPrint/pull/2774>
Never try to render SVG use tags with external sources
* _:#2791 <https://github.com/Kozea/WeasyPrint/pull/2791>
Fix calc in logical
* _:
Improve management of variables
Documentation:
* #2703 <https://github.com/Kozea/WeasyPrint/issues/2703>_,#2733 <https://github.com/Kozea/WeasyPrint/pull/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
Version 68.1
------------
Released on 2026-02-06.
Bug fixes:
* #2662 <https://github.com/Kozea/WeasyPrint/issues/2662>_:#2665 <https://github.com/Kozea/WeasyPrint/issues/2665>
Don’t crash when SVG clip paths are not in defs tags
* _:#2663 <https://github.com/Kozea/WeasyPrint/issues/2663>
Fix position of box bounding box
* _:#2666 <https://github.com/Kozea/WeasyPrint/issues/2666>
Fix transparency with Acrobat and Edge
* _:#2670 <https://github.com/Kozea/WeasyPrint/issues/2670>
Don’t rely on random default font to define test page size
* _:#2671 <https://github.com/Kozea/WeasyPrint/pull/2671>
Fix pattern detection of URL schemes
* _:#2672 <https://github.com/Kozea/WeasyPrint/issues/2672>
Improve API compatibility between URLFetcherResponse and addinfourl
* _:#2675 <https://github.com/Kozea/WeasyPrint/pull/2675>
Fix charset for old URL fetcher requests
* _,#2673 <https://github.com/Kozea/WeasyPrint/issues/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
Version 68.0
------------
Released on 2026-01-19.
This is a security update (CVE-2025-68616).
We strongly recommend to upgrade WeasyPrint to the latest version if you use thedefault_url_fetcher function in your custom URL fetcher, or if you use theallowed_protocols parameter of the default_url_fetcher function.
Security:
* Always use URL fetcher for HTTP redirects
Python API:
* default_url_fetcher() is deprecated, use the new URLFetcher class instead, seeURL Fetchers
:ref: for more information about URL fetchers
* DocumentMetadata.generate_rdf_metadata is now a method that can be overriddenFactur-X / ZUGFeRD (Electronic Invoices)
instead of a parameter, see :ref: for
examples to create e-invoices
Features:
* #2609 <https://github.com/Kozea/WeasyPrint/pull/2609>_,#2603 <https://github.com/Kozea/WeasyPrint/issues/2603>
_,#351 <https://github.com/Kozea/WeasyPrint/issues/351>
_:#2632 <https://github.com/Kozea/WeasyPrint/pull/2632>
Refactor URL fetcher API
* _:#2627 <https://github.com/Kozea/WeasyPrint/pull/2627>
Support legacy 0 value for angles
* _:#2646 <https://github.com/Kozea/WeasyPrint/pull/2646>
Add font-face support to SVG
* _,#2255 <https://github.com/Kozea/WeasyPrint/issues/2255>
_:#2590 <https://github.com/Kozea/WeasyPrint/pull/2590>
Add font shorthand support for SVG text elements
* _,#1749 <https://github.com/Kozea/WeasyPrint/issues/1749>
_:#2645 <https://github.com/Kozea/WeasyPrint/pull/2645>
Honor language-specific rules for text-transform
* _,#2613 <https://github.com/Kozea/WeasyPrint/issues/2613>
_:#2658 <https://github.com/Kozea/WeasyPrint/pull/2658>
Improve SVG and SVG emojis rendering
* _,#2583 <https://github.com/Kozea/WeasyPrint/issues/2583>
_:
Add CLI for Factur-X / ZUGFeRD e-invoices
Bug fixes:
* #2649 <https://github.com/Kozea/WeasyPrint/issues/2649>_:#2643 <https://github.com/Kozea/WeasyPrint/pull/2643>
Refactor URL fetcher API
* _,#2628 <https://github.com/Kozea/WeasyPrint/issues/2628>
_:#2641 <https://github.com/Kozea/WeasyPrint/pull/2641>
Handle box-sizing: border-box in grid layout
* _,#1875 <https://github.com/Kozea/WeasyPrint/issues/1875>
_:#2488 <https://github.com/Kozea/WeasyPrint/pull/2488>
Process whitespace after checking all pending targets
* _,#2485 <https://github.com/Kozea/WeasyPrint/issues/2485>
_:#2642 <https://github.com/Kozea/WeasyPrint/pull/2642>
Preserve page groups during layout repagination
* _,#2631 <https://github.com/Kozea/WeasyPrint/issues/2631>
_:#2637 <https://github.com/Kozea/WeasyPrint/issues/2637>
Don’t use isolated transparency groups
* _:#2622 <https://github.com/Kozea/WeasyPrint/issues/2622>
Fix repeating radial gradients rendering
* _:#2626 <https://github.com/Kozea/WeasyPrint/issues/2626>
Fix validation of colors
* _:#2621 <https://github.com/Kozea/WeasyPrint/issues/2621>
Share grid items rendering advancement between a box and its copies
* _:#2619 <https://github.com/Kozea/WeasyPrint/issues/2619>
Correctly handle fallback values of attr()
* _:#2629 <https://github.com/Kozea/WeasyPrint/issues/2629>
Fix SVG fonts
* _:#2648 <https://github.com/Kozea/WeasyPrint/issues/2648>
Always define extra skip height that may be used after
* _:#2648 <https://github.com/Kozea/WeasyPrint/issues/2660>
Fix numbers validation in font-feature-settings
* _:#2661 <https://github.com/Kozea/WeasyPrint/issues/2661>
Fix keyword values for text-decoration-thickness
* _:
Respect inline images when defining minimum table width
Documentation:
* #2638 <https://github.com/Kozea/WeasyPrint/pull/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
Version 67.0
------------
Released on 2025-12-02.
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 <https://github.com/Kozea/WeasyPrint/pull/2560>_,#640 <https://github.com/Kozea/WeasyPrint/issues/640>
_,#844 <https://github.com/Kozea/WeasyPrint/issues/844>
_,#1091 <https://github.com/Kozea/WeasyPrint/issues/1091>
_,#2517 <https://github.com/Kozea/WeasyPrint/issues/2517>
_:#2558 <https://github.com/Kozea/WeasyPrint/pull/2558>
Support CMYK colors, PDF/X, color profiles and light-dark() function
* _,#1175 <https://github.com/Kozea/WeasyPrint/issues/1175>
_:#2552 <https://github.com/Kozea/WeasyPrint/pull/2552>
Support ::first-line, with financial support from Karte Technology
* _:#2564 <https://github.com/Kozea/WeasyPrint/pull/2564>
Support CSS layers, with financial support from Code & Co.
* _,#2599 <https://github.com/Kozea/WeasyPrint/pull/2599>
_,#2397 <https://github.com/Kozea/WeasyPrint/issues/2397>
_:#2568 <https://github.com/Kozea/WeasyPrint/pull/2568>
Allow page breaks in grid rows, with financial support from Ocean Recap
* _,#357 <https://github.com/Kozea/WeasyPrint/issues/357>
_:#2575 <https://github.com/Kozea/WeasyPrint/pull/2575>
Support calc() and other mathematical functions
* _,#2574 <https://github.com/Kozea/WeasyPrint/issues/2574>
_:#2611 <https://github.com/Kozea/WeasyPrint/pull/2611>
Support PDF/A-1a, PDF/A-2a and PDF/A-3a
* _,#2573 <https://github.com/Kozea/WeasyPrint/issues/2573>
_:#2523 <https://github.com/Kozea/WeasyPrint/pull/2523>
Support PDF/A-4e and PDF/A-4f
* _:#2581 <https://github.com/Kozea/WeasyPrint/pull/2581>
Display tofu for missing glyphs
* _:#2570 <https://github.com/Kozea/WeasyPrint/pull/2570>
Add option to disable protocols in URL resolution
* _:#2547 <https://github.com/Kozea/WeasyPrint/pull/2547>
Support rch, cap, rcap, rex, ic and ric font-relative units
* _,#2140 <https://github.com/Kozea/WeasyPrint/issues/2140>
_:
Support "only" keyword in media queries
Bug fixes:
* #2516 <https://github.com/Kozea/WeasyPrint/pull/2516>_,#1510 <https://github.com/Kozea/WeasyPrint/issues/1510>
_:#2510 <https://github.com/Kozea/WeasyPrint/pull/2510>
Fix rendering of first line of text with nested right float
* _,#1073 <https://github.com/Kozea/WeasyPrint/issues/1073>
_,#2507 <https://github.com/Kozea/WeasyPrint/issues/2507>
_:#2532 <https://github.com/Kozea/WeasyPrint/pull/2532>
Avoid Pango crashes and font mismatches with @font-face rules referencing local fonts
* _,#2531 <https://github.com/Kozea/WeasyPrint/issues/2531>
_:#2541 <https://github.com/Kozea/WeasyPrint/pull/2541>
Use fonttools instancer instead of deprecated mutator API
* _:#2543 <https://github.com/Kozea/WeasyPrint/pull/2543>
Fix syntax of functions
* _:#2525 <https://github.com/Kozea/WeasyPrint/pull/2525>
Allow font-related units to access @font-face fonts
* _:#2536 <https://github.com/Kozea/WeasyPrint/pull/2536>
Respect top margins and avoid overlapping footnotes for columns, with financial support from Code & Co.
* _:#2539 <https://github.com/Kozea/WeasyPrint/pull/2539>
Remove Subtype key from font descriptor
* _:#2537 <https://github.com/Kozea/WeasyPrint/pull/2537>
Fix min width for SVGs with intrinsic ratio but no intrinsic size
* _,#2533 <https://github.com/Kozea/WeasyPrint/issues/2533>
_:#2538 <https://github.com/Kozea/WeasyPrint/pull/2538>
Fix order of operators when drawing SVGs
* _:#2542 <https://github.com/Kozea/WeasyPrint/pull/2542>
Don’t crash with nested unknown functions
* _:#2540 <https://github.com/Kozea/WeasyPrint/pull/2540>
Don’t crash when lh and rlh are used for line height or font size
* _,#2528 <https://github.com/Kozea/WeasyPrint/issues/2528>
_:#2563 <https://github.com/Kozea/WeasyPrint/pull/2563>
Use locale encoding instead of filesystem encoding for font paths
* _,#2479 <https://github.com/Kozea/WeasyPrint/issues/2479>
_:#2569 <https://github.com/Kozea/WeasyPrint/pull/2569>
Don’t avoid float collisions for atomic flex items
* _:#2567 <https://github.com/Kozea/WeasyPrint/pull/2567>
Don’t be case-sensitive for units
* _,#2566 <https://github.com/Kozea/WeasyPrint/issues/2566>
_:#2586 <https://github.com/Kozea/WeasyPrint/pull/2586>
Add x-default attribute for metadata description to be compliant with PDF/A
* _,#2571 <https://github.com/Kozea/WeasyPrint/issues/2571>
_:#2600 <https://github.com/Kozea/WeasyPrint/pull/2600>
Improve formatting contexts management
* _:#2612 <https://github.com/Kozea/WeasyPrint/pull/2612>
Fix SVG image aspect ratio when only width or height is specified
* _,#2595 <https://github.com/Kozea/WeasyPrint/pull/2595>
_:#2522 <https://github.com/Kozea/WeasyPrint/issues/2522>
Clean block layout and fix corner cases
* _:#2544 <https://github.com/Kozea/WeasyPrint/issues/2544>
Ignore preserveAspectRatio when SVG has no viewBox
* _:#2555 <https://github.com/Kozea/WeasyPrint/issues/2555>
Allow to use a variable twice in a function
* _:#2591 <https://github.com/Kozea/WeasyPrint/issues/2591>
Fix flex gap in right-to-left context
* _:#2601 <https://github.com/Kozea/WeasyPrint/issues/2601>
Respect non-auto widths and fix padding of grid items
* _:#2607 <https://github.com/Kozea/WeasyPrint/issues/2607>
Don’t crash when tagged tables are not displayed as tables
* _:#2106 <https://github.com/Kozea/WeasyPrint/issues/2106>
Fix rendering of multiline textareas with PDF forms
* _:#2618 <https://github.com/Kozea/WeasyPrint/pull/2618>
Force variable initialization to avoid crashes during column layout
* _,#2617 <https://github.com/Kozea/WeasyPrint/issues/2617>
_:
Fix rendering of relative grid and flex items
Documentation:
* #2535 <https://github.com/Kozea/WeasyPrint/pull/2535>_:#2534 <https://github.com/Kozea/WeasyPrint/issues/2534>
_:
Removed reference to defunct site
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
Version 66.0
------------
Released on 2025-07-24.
Features:
* #2475 <https://github.com/Kozea/WeasyPrint/pull/2475>_:#2432 <https://github.com/Kozea/WeasyPrint/issues/2432>
Add support for 'lh' and 'rlh' units
* _,#2437 <https://github.com/Kozea/WeasyPrint/pull/2437>
_:#2256 <https://github.com/Kozea/WeasyPrint/issues/2256>
Report footnotes when text overflows because of orphans, with financial support from Code & Co.
* _,#2466 <https://github.com/Kozea/WeasyPrint/pull/2466>
_:#2445 <https://github.com/Kozea/WeasyPrint/pull/2445>
Handle transform-origin in SVG
* _:
Add parameter to have additional HTTP headers for url_fetcher
Bug fixes:
* #2471 <https://github.com/Kozea/WeasyPrint/pull/2471>_,#2506 <https://github.com/Kozea/WeasyPrint/pull/2506>
_,#2500 <https://github.com/Kozea/WeasyPrint/issues/2500>
_,#2460 <https://github.com/Kozea/WeasyPrint/issues/2460>
_,#2363 <https://github.com/Kozea/WeasyPrint/issues/2363>
_,#2470 <https://github.com/Kozea/WeasyPrint/issues/2470>
_,#1872 <https://github.com/Kozea/WeasyPrint/issues/1872>
_,#2153 <https://github.com/Kozea/WeasyPrint/issues/2153>
_,#1838 <https://github.com/Kozea/WeasyPrint/issues/1838>
_,#1837 <https://github.com/Kozea/WeasyPrint/issues/1837>
_,#1784 <https://github.com/Kozea/WeasyPrint/issues/1784>
_,#1835 <https://github.com/Kozea/WeasyPrint/issues/1835>
_,#2444 <https://github.com/Kozea/WeasyPrint/issues/2444>
_,#2497 <https://github.com/Kozea/WeasyPrint/issues/2497>
_,#2505 <https://github.com/Kozea/WeasyPrint/issues/2505>
_,#2503 <https://github.com/Kozea/WeasyPrint/issues/2503>
_,#1836 <https://github.com/Kozea/WeasyPrint/issues/1836>
_,#2467 <https://github.com/Kozea/WeasyPrint/issues/2467>
_:#2425 <https://github.com/Kozea/WeasyPrint/pull/2425>
Improve PDF/UA support, with financial support from NLnet
* _,#1557 <https://github.com/Kozea/WeasyPrint/issues/1557>
_:#2409 <https://github.com/Kozea/WeasyPrint/pull/2409>
Improve position of outside markers
* _,#2265 <https://github.com/Kozea/WeasyPrint/issues/2265>
_:#2416 <https://github.com/Kozea/WeasyPrint/pull/2416>
Draw circles instead of rectangles when drawing dotted borders
* _,#2270 <https://github.com/Kozea/WeasyPrint/issues/2270>
_:#2439 <https://github.com/Kozea/WeasyPrint/pull/2439>
Correctly split words for automatic hyphenation
* _,#2426 <https://github.com/Kozea/WeasyPrint/issues/2426>
_:#2433 <https://github.com/Kozea/WeasyPrint/pull/2433>
Don’t rely on URL protocols outside URL fetcher function
* _:#2447 <https://github.com/Kozea/WeasyPrint/pull/2447>
Disable style for deprecated outline algorithm
* _,#2441 <https://github.com/Kozea/WeasyPrint/issues/2441>
_,#2448 <https://github.com/Kozea/WeasyPrint/issues/2448>
_:#2454 <https://github.com/Kozea/WeasyPrint/pull/2454>
Improve min- and max-content calculation, with financial support from Menutech
* _,#2442 <https://github.com/Kozea/WeasyPrint/issues/2442>
_,#2449 <https://github.com/Kozea/WeasyPrint/issues/2449>
_:#2473 <https://github.com/Kozea/WeasyPrint/pull/2473>
Minor fixes for flex layout
* _,#2459 <https://github.com/Kozea/WeasyPrint/issues/2459>
_:#2458 <https://github.com/Kozea/WeasyPrint/pull/2458>
Include out-of-flow boxes in page layout progress, with financial support from Pathfindr
* _:#2494 <https://github.com/Kozea/WeasyPrint/pull/2494>
Replace deprecated warn logger function
* _,#1856 <https://github.com/Kozea/WeasyPrint/issues/1856>
_:#2435 <https://github.com/Kozea/WeasyPrint/issues/2435>
Fix bug with bottom margins in columns
* _:#2484 <https://github.com/Kozea/WeasyPrint/issues/2484>
Make footnote calls inherit from footnotes
* _,#2456 <https://github.com/Kozea/WeasyPrint/issues/2456>
_:#2450 <https://github.com/Kozea/WeasyPrint/issues/2450>
Allow to avoid page breaks after table-row-group elements
* _:#2453 <https://github.com/Kozea/WeasyPrint/issues/2453>
Draw background and borders for relative grid containers
* _:#2493 <https://github.com/Kozea/WeasyPrint/issues/2493>
Don’t advance position_y for collapsed margins of discarded children
* _:#2502 <https://github.com/Kozea/WeasyPrint/issues/2502>
Fix endless loop with CSS variables referencing each other
* _:
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
Version 65.1
------------
Released on 2025-04-14.
Bug fixes:
* #2414 <https://github.com/Kozea/WeasyPrint/issues/2414>_:1b24ad9 <https://github.com/Kozea/WeasyPrint/commit/1b24ad9>
Correctly handle flex columns split between pages
* _:#2419 <https://github.com/Kozea/WeasyPrint/issues/2419>
Include padding in outer size of item elements
* _:#2415 <https://github.com/Kozea/WeasyPrint/issues/2415>
Set main tag as block by default
* _:83da2fe0 <https://github.com/Kozea/WeasyPrint/commit/83da2fe0>
Fix support of replaced block box as flex items
* _:#2429 <https://github.com/Kozea/WeasyPrint/issues/2429>
Fix margins and padding for rtl lists
* _,#1076 <https://github.com/Kozea/WeasyPrint/issues/1076>
_,#2431 <https://github.com/Kozea/WeasyPrint/pull/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
Version 65.0
------------
Released on 2025-03-20.
Dependencies:
* CSSSelect2 0.8.0 is now needed
Features:
* #1665 <https://github.com/Kozea/WeasyPrint/issues/1665>_:#378 <https://github.com/Kozea/WeasyPrint/issues/378>
Support gap properties in Flex layout, with financial support from NLnet
* _,#2405 <https://github.com/Kozea/WeasyPrint/pull/2405>
_:#2394 <https://github.com/Kozea/WeasyPrint/pull/2394>
Handle @font-face unicode-range
* _:
Modernize and improve default user agent stylesheets
Bug fixes:
* #2362 <https://github.com/Kozea/WeasyPrint/issues/2362>_,#2387 <https://github.com/Kozea/WeasyPrint/pull/2387>
_,#601 <https://github.com/Kozea/WeasyPrint/issues/601>
_,#1967 <https://github.com/Kozea/WeasyPrint/issues/1967>
_,#1805 <https://github.com/Kozea/WeasyPrint/issues/1805>
_,#2163 <https://github.com/Kozea/WeasyPrint/issues/2163>
_,#2342 <https://github.com/Kozea/WeasyPrint/issues/2342>
_,#2374 <https://github.com/Kozea/WeasyPrint/issues/2374>
_,#1109 <https://github.com/Kozea/WeasyPrint/issues/1109>
_,#1356 <https://github.com/Kozea/WeasyPrint/issues/1356>
_,#1327 <https://github.com/Kozea/WeasyPrint/issues/1327>
_,#1563 <https://github.com/Kozea/WeasyPrint/issues/1563>
_,#1652 <https://github.com/Kozea/WeasyPrint/issues/1652>
_,#2351 <https://github.com/Kozea/WeasyPrint/issues/2351>
_,#2312 <https://github.com/Kozea/WeasyPrint/issues/2312>
_,#2340 <https://github.com/Kozea/WeasyPrint/issues/2340>
_,#1311 <https://github.com/Kozea/WeasyPrint/issues/1311>
_,#2066 <https://github.com/Kozea/WeasyPrint/issues/2066>
_,#2359 <https://github.com/Kozea/WeasyPrint/issues/2359>
_,#2053 <https://github.com/Kozea/WeasyPrint/issues/2053>
_:#1686 <https://github.com/Kozea/WeasyPrint/issues/1686>
Improve Flex layout, with financial support from NLnet.
* _,#2404 <https://github.com/Kozea/WeasyPrint/pull/2404>
_:#2372 <https://github.com/Kozea/WeasyPrint/issues/2372>
Fix duplicate text selection with right-to-left text
* _,#2389 <https://github.com/Kozea/WeasyPrint/pull/2389>
_:#2403 <https://github.com/Kozea/WeasyPrint/issues/2403>
Fix justification of right-to-left text
* _:#2392 <https://github.com/Kozea/WeasyPrint/issues/2392>
Fix emoji rendering with older versions of Pango
* _:#2396 <https://github.com/Kozea/WeasyPrint/issues/2396>
Fix complex cases involving nested SVG text anchors
* _,#2398 <https://github.com/Kozea/WeasyPrint/pull/2398>
_:#2269 <https://github.com/Kozea/WeasyPrint/issues/2269>
Fix and improve font names in PDF
* _,#2390 <https://github.com/Kozea/WeasyPrint/pull/2390>
_:#2362 <https://github.com/Kozea/WeasyPrint/issues/2362>
Apply justification to non-breaking spaces
* _,#2387 <https://github.com/Kozea/WeasyPrint/pull/2387>
_:
Improve Flex layout, with financial support from NLnet.
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
Version 64.1
------------
Released on 2025-02-20.
Bug fixes:
* #2368 <https://github.com/Kozea/WeasyPrint/issues/2368>_:#2370 <https://github.com/Kozea/WeasyPrint/issues/2370>
Fix ascent and descent font values
* _:#2275 <https://github.com/Kozea/WeasyPrint/issues/2275>
Avoid endless recursion for variables in nested functions
* _:#2375 <https://github.com/Kozea/WeasyPrint/issues/2375>
Use correct containing block to render waiting children
* _:#2090 <https://github.com/Kozea/WeasyPrint/issues/2090>
Ensure that we handle text-anchor only on text content elements
* _:#2383 <https://github.com/Kozea/WeasyPrint/issues/2383>
Only create font temporary folder when adding fonts
* _:
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.
Version 64.0
------------
Released on 2025-01-30.
Features:
* #2338 <https://github.com/Kozea/WeasyPrint/pull/2338>_:#123 <https://github.com/Kozea/WeasyPrint/issues/123>
Allow custom RDF metadata for PDF/A and eInvoices
* _,#2345 <https://github.com/Kozea/WeasyPrint/pull/2345>
_:#2343 <https://github.com/Kozea/WeasyPrint/issues/2343>
Handle small-caps synthesis
* _:#2361 <https://github.com/Kozea/WeasyPrint/pull/2361>
Support outline-offset
* _:#2296 <https://github.com/Kozea/WeasyPrint/issues/2296>
Support text-underline-offset and text-decoration-thickness
* _:
Don’t crash with tables with rounded corners split between pages
Bug fixes:
* #2360 <https://github.com/Kozea/WeasyPrint/issues/2360>_:#2355 <https://github.com/Kozea/WeasyPrint/issues/2355>
Fix gradients with non-RGB colors
* _,#2358 <https://github.com/Kozea/WeasyPrint/pull/2358>
_:#2353 <https://github.com/Kozea/WeasyPrint/issues/2353>
Align png emojis to the surrounding text
* _:#2350 <https://github.com/Kozea/WeasyPrint/pull/2350>
Fix alignment of SVG text with multiple nested text-anchor values
* _:#2341 <https://github.com/Kozea/WeasyPrint/pull/2341>
Fix logging restoration in capture_logs
* _:#2314 <https://github.com/Kozea/WeasyPrint/pulls/2314>
Fix page groups
* _:#2332 <https://github.com/Kozea/WeasyPrint/issues/2332>
Use CSS 'image-rendering' attribute for images in SVGs
* _:#2329 <https://github.com/Kozea/WeasyPrint/issues/2329>
Fix opacity for translated SVG elements
* _:#2325 <https://github.com/Kozea/WeasyPrint/issues/2325>
Refactor text.line_break.get_log_attrs
* _,#2326 <https://github.com/Kozea/WeasyPrint/pull/2326>
_:
Fix table overflow edge cases
Performance:
* #2347 <https://github.com/Kozea/WeasyPrint/issues/2347>_,#2364 <https://github.com/Kozea/WeasyPrint/pull/2364>
_:
Improve rendering speed for text
Documentation:
* #2352 <https://github.com/Kozea/WeasyPrint/pull/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.
Version 63.1
------------
Released on 2024-12-10.
Dependencies:
* #2297 <https://github.com/Kozea/WeasyPrint/issues/2297>_:
Remove upper bounds for dependencies
Bug fixes:
* #2300 <https://github.com/Kozea/WeasyPrint/pull/2300>_,#2292 <https://github.com/Kozea/WeasyPrint/issues/2292>
_:#2301 <https://github.com/Kozea/WeasyPrint/pull/2301>
Don’t avoid floats for flex items
* _,#2293 <https://github.com/Kozea/WeasyPrint/issues/2293>
_:#2303 <https://github.com/Kozea/WeasyPrint/pull/2303>
Include floats in calculation of minimum cell height
* _,#2302 <https://github.com/Kozea/WeasyPrint/issues/2302>
_:#2306 <https://github.com/Kozea/WeasyPrint/issues/2306>
Set alpha even when current color channels didn’t change
* _:#2304 <https://github.com/Kozea/WeasyPrint/issues/2304>
Don’t try to increase column width when there’s no extra width
* _:#2316 <https://github.com/Kozea/WeasyPrint/issues/2316>
Don’t forget skip stack when drawing flex items
* _:#2320 <https://github.com/Kozea/WeasyPrint/issues/2320>
Don’t crash with SVG symbols
* _:#2322 <https://github.com/Kozea/WeasyPrint/pull/2322>
Fix currentcolor detection when parsing gradient color stops
* _,#2289 <https://github.com/Kozea/WeasyPrint/issues/2289>
_:#2323 <https://github.com/Kozea/WeasyPrint/pull/2323>
Don’t add DLL directories when using Windows executable
* _,#2305 <https://github.com/Kozea/WeasyPrint/issues/2305>
_:
Fix different rendering test
Performance:
* #2319 <https://github.com/Kozea/WeasyPrint/issues/2319>_:
Fix memory leaks
Documentation:
* #2299 <https://github.com/Kozea/WeasyPrint/pull/2299>_:#2321 <https://github.com/Kozea/WeasyPrint/pull/2321>
Update install instructions for Alpine
* _:
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-Yves Fargialla
* Morntag
* Xavid
Version 63.0
------------
Released on 2024-10-29.
Dependencies:
* Python 3.13 is now supported
* pydyf 0.11.0+ is now needed
* tinycss2 1.4.0+ is now needed
* tinyhtml5 2.0.0+ is now needed, instead of html5lib
Features:
* #2252 <https://github.com/Kozea/WeasyPrint/pull/2252>_,#895 <https://github.com/Kozea/WeasyPrint/issues/895>
_:#1630 <https://github.com/Kozea/WeasyPrint/issues/1630>
Handle page groups, with financial support from Code & Co.
* _,#2286 <https://github.com/Kozea/WeasyPrint/pull/2286>
_:#2192 <https://github.com/Kozea/WeasyPrint/pull/2192>
Support CSS Color Level 4
* _:#2208 <https://github.com/Kozea/WeasyPrint/pull/2208>
Add PDF variant for debugging purpose
* _:#2139 <https://github.com/Kozea/WeasyPrint/pull/2139>
Support submit inputs in PDF forms
* _:
Support mask-border-* properties#1831 <https://github.com/Kozea/WeasyPrint/issues/1831>
* _,#2143 <https://github.com/Kozea/WeasyPrint/pull/2143>
_:
Support radio inputs in PDF forms
Bug fixes:
* #2262 <https://github.com/Kozea/WeasyPrint/issues/2262>_:#2260 <https://github.com/Kozea/WeasyPrint/pull/2260>
Avoid integer overflows when converting units from/to doubles
* _:#2240 <https://github.com/Kozea/WeasyPrint/issues/2240>
Avoid float collision with box establishing formatting context
* _,#2242 <https://github.com/Kozea/WeasyPrint/pull/2242>
_:
Handle svg tags with no size#2231 <https://github.com/Kozea/WeasyPrint/pull/2231>
* _,#1171 <https://github.com/Kozea/WeasyPrint/issues/1171>
_,#2222 <https://github.com/Kozea/WeasyPrint/issues/2222>
_,#1208 <https://github.com/Kozea/WeasyPrint/issues/1208>
_:
Fix several problems related to flex-direction: column#2239 <https://github.com/Kozea/WeasyPrint/issues/2239>
* _:#2230 <https://github.com/Kozea/WeasyPrint/issues/2230>
Don’t fail when SVG markers are undefined references
* _,#2238 <https://github.com/Kozea/WeasyPrint/pull/2238>
_:#2228 <https://github.com/Kozea/WeasyPrint/issues/2228>
Set explicit flags when loading DLLs on Windows
* _,#1942 <https://github.com/Kozea/WeasyPrint/issues/1942>
_:#2234 <https://github.com/Kozea/WeasyPrint/issues/2234>
Store original and PDF stream images in different cache slots
* _:#2054 <https://github.com/Kozea/WeasyPrint/issues/2054>
Apply stylesheet and other basic operations to SVG root tag
* _,#2233 <https://github.com/Kozea/WeasyPrint/pull/2233>
_:#1883 <https://github.com/Kozea/WeasyPrint/issues/1883>
Keep auto margins on flex layout boxes
* _:#2216 <https://github.com/Kozea/WeasyPrint/issues/2216>
Don’t crash with empty list marker strings
* _:#996 <https://github.com/Kozea/WeasyPrint/issues/996>
Fix vertical alignment of out-of-flow elements in tables
* _,#2219 <https://github.com/Kozea/WeasyPrint/pull/2219>
_:#2217 <https://github.com/Kozea/WeasyPrint/issues/2217>
Don’t ignore absolutely positioned elements inside flex boxes
* _:
Don’t crash with normal column gaps#1817 <https://github.com/Kozea/WeasyPrint/issues/1817>
* _:#1868 <https://github.com/Kozea/WeasyPrint/issues/1868>
Don’t assume that lines break after spaces
* _:#2166 <https://github.com/Kozea/WeasyPrint/issues/2166>
Don’t break rows with atomic cells
* _:61852c4 <https://github.com/Kozea/WeasyPrint/commit/61852c4>
Don’t display bottom border on cells in split rows
* _:#2190 <https://github.com/Kozea/WeasyPrint/pull/2190>
Capture fontTools logs when subsetting fonts
* _:#2185 <https://github.com/Kozea/WeasyPrint/issues/2185>
Don’t use a pattern when drawing backgrounds for no-repeat background images
* _:#2180 <https://github.com/Kozea/WeasyPrint/issues/2180>
Check that Harfbuzz version is at least 4.1.0 to subset fonts
* _:#2183 <https://github.com/Kozea/WeasyPrint/issues/2183>
Store width for all glyphs when font is not subset
* _:
Respect break-inside: avoid for flex items#2055 <https://github.com/Kozea/WeasyPrint/issues/2055>
* _,#2058 <https://github.com/Kozea/WeasyPrint/pull/2058>
_:#2179 <https://github.com/Kozea/WeasyPrint/pull/2179>
Fix right-to-left tables with collapsed borders
* _,#1128 <https://github.com/Kozea/WeasyPrint/issues/1128>
_:#2175 <https://github.com/Kozea/WeasyPrint/issues/2175>
Handle buggy Adobe Photoshop CMYK JPEGs
* _:#2174 <https://github.com/Kozea/WeasyPrint/issues/2174>
Don’t compress PDF metadata for PDF/A-1
* _:
Fix extra width distribution for auto table layout
Performance:
* #1155 <https://github.com/Kozea/WeasyPrint/issues/1155>_:#2120 <https://github.com/Kozea/WeasyPrint/issues/2120>
Improve rendering speed for large colspan values
* _,#2178 <https://github.com/Kozea/WeasyPrint/pull/2178>
_:
Use Harfbuzz to subset fonts by default
Documentation:
* #2282 <https://github.com/Kozea/WeasyPrint/issues/2282>_,#2284 <https://github.com/Kozea/WeasyPrint/pull/2284>
_:#2254 <https://github.com/Kozea/WeasyPrint/issues/2254>
Simplify Alpine install instructions
* _:#2220 <https://github.com/Kozea/WeasyPrint/pull/2220>
Add warning about antivirus false detection
* _:#2211 <https://github.com/Kozea/WeasyPrint/pull/2211>
Add extra information to debug logs
* _:#2195 <https://github.com/Kozea/WeasyPrint/pull/2195>
Fix link to samples
* _:#2105 <https://github.com/Kozea/WeasyPrint/issues/2105>
Update cache argument documentation
* _,#2151 <https://github.com/Kozea/WeasyPrint/pull/2151>
_:
Use MSYS2 instead of GTK+3 for Windows
Contributors:
* Guillaume Ayoub
* David Huggins-Daines
* Xavid Pretzer
* Yann Trividic
* Kevin Kays
* Alejandro Avilés
* Gianluca Teti
* Gregory Goodson
* Lucie Anglade
* Roman Sirokov
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-Yves Fargialla
* Morntag
* Xavid
Version 62.3
------------
Released on 2024-06-21.
Bug fixes:
* #2174 <https://github.com/Kozea/WeasyPrint/issues/2174>_:#2175 <https://github.com/Kozea/WeasyPrint/issues/2175>
Fix extra width distribution for auto table layout
* _:61f8bb3 <https://github.com/Kozea/WeasyPrint/commit/61f8bb3>
Don’t compress PDF metadata for PDF/A-1
* _:2c4351e <https://github.com/Kozea/WeasyPrint/commit/2c4351e>
Set default PDF variant values in options before generating PDF
* _:d9d7f62 <https://github.com/Kozea/WeasyPrint/commit/d9d7f62>
Avoid PDF artifacts when drawing 0-width borders
* _:4617b94 <https://github.com/Kozea/WeasyPrint/commit/4617b94>
Don’t duplicate column when container is split on multiple pages
* _:4c81663 <https://github.com/Kozea/WeasyPrint/commit/4c81663>
Don’t set default Fontconfig values for unset properties
* _:#2184 <https://github.com/Kozea/WeasyPrint/issues/2184>
Fix layout when all footnotes are removed from the footnote area
* _:#2187 <https://github.com/Kozea/WeasyPrint/issues/2187>
Make items overflowing grid wrap to the next row/column
* _:
Don’t append useless tracks when grid elements are positioned
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Simon Sapin
* René Fritz
* TrainingSparkle
* Healthchecks.io
* Hammerbacher
* Docraptor
* Yanal-Yves Fargialla
* Douwe van Loenen
* Morntag
* Xavid
Version 62.2
------------
Released on 2024-06-04.
Features:
* #2142 <https://github.com/Kozea/WeasyPrint/issues/2142>_,#2162 <https://github.com/Kozea/WeasyPrint/pull/2162>
_:
Support grid-auto-flow: column, with financial support from Menutech
Bug fixes:
* #2167 <https://github.com/Kozea/WeasyPrint/issues/2167>_:#2134 <https://github.com/Kozea/WeasyPrint/issues/2134>
Fix space added by CSS gap at the end
* _:#2154 <https://github.com/Kozea/WeasyPrint/issues/2154>
Remove absolute placeholders from discarded content
* _:8cdd66f <https://github.com/Kozea/WeasyPrint/commit/8cdd66f>
Don’t crash when grid items have auto margins
* _:3359db5 <https://github.com/Kozea/WeasyPrint/commit/3359db5>
Fix CSS nesting for nested selectors with comma
* _:82deda4 <https://github.com/Kozea/WeasyPrint/commit/82deda4>
Fix and test grid shorthand
* _:ff2acf1 <https://github.com/Kozea/WeasyPrint/commit/ff2acf1>
Fix wrong resume_at for split floats
* _:
Ensure that gradient size is positive to please some PDF readers
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Simon Sapin
* René Fritz
* TrainingSparkle
* Healthchecks.io
* Hammerbacher
* Docraptor
* Yanal-Yves Fargialla
* Douwe van Loenen
* Morntag
* Xavid
Version 62.1
------------
Released on 2024-05-06.
Bug fixes:
* #2144 <https://github.com/Kozea/WeasyPrint/issues/2144>_,#2149 <https://github.com/Kozea/WeasyPrint/pull/2149>
_:c10c6892 <https://github.com/Kozea/WeasyPrint/commit/c10c6892>
Avoid broken fonts when generating multiple documents
* _:#2146 <https://github.com/Kozea/WeasyPrint/issues/2146>
Display at least one grid row on empty pages
* _:
Don’t crash when flex container’s parent’s height is auto
Contributors:
* Guillaume Ayoub
* Claudius Ellsel
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Simon Sapin
* René Fritz
* TrainingSparkle
* Healthchecks.io
* Docraptor
* Yanal-Yves Fargialla
* Douwe van Loenen
* Morntag
* Xavid
Version 62.0
------------
Released on 2024-04-30.
Dependencies:
* Python 3.9+ is now needed, Python 3.7 and 3.8 are not supported anymore
* pydyf 0.10.0+ is now needed
* tinycss2 1.3.0+ is now needed
Features:
* #543 <https://github.com/Kozea/WeasyPrint/issues/543>_,#2121 <https://github.com/Kozea/WeasyPrint/pull/2121>
_:#2124 <https://github.com/Kozea/WeasyPrint/issues/2124>
Support CSS Grid layout
* _,#2125 <https://github.com/Kozea/WeasyPrint/pull/2125>
_:#2084 <https://github.com/Kozea/WeasyPrint/issues/2084>
Support border-image-* properties
* _,#2077 <https://github.com/Kozea/WeasyPrint/pull/2077>
_:#2101 <https://github.com/Kozea/WeasyPrint/issues/2101>
Support CSS nesting
* _:#2095 <https://github.com/Kozea/WeasyPrint/pull/2095>
Support HTML maxlength attribute for form fields
* _:245e4f5 <https://github.com/Kozea/WeasyPrint/commit/245e4f5>
Apply overflow to replaced boxes
* _:
Add support of PDF/A-?u
Bug fixes:
* #2136 <https://github.com/Kozea/WeasyPrint/issues/2136>_:#2135 <https://github.com/Kozea/WeasyPrint/pull/2135>
Don’t clip aligned text in SVG
* _:#2128 <https://github.com/Kozea/WeasyPrint/issues/2128>
Allow column-direction flex containers to use percentage-based heights
* _:#2079 <https://github.com/Kozea/WeasyPrint/issues/2079>
Don’t crash when a FontConfig object is destroyed early
* _:#2131 <https://github.com/Kozea/WeasyPrint/issues/2131>
Fix executable file for some Windows versions
* _:#2111 <https://github.com/Kozea/WeasyPrint/issues/2111>
Fix alpha for images before/after transparent text
* _:#2103 <https://github.com/Kozea/WeasyPrint/issues/2103>
Handle auto and none values for CSS quotes property
* _:#2100 <https://github.com/Kozea/WeasyPrint/issues/2100>
Don’t crash with overconstrained columns
* _:#2093 <https://github.com/Kozea/WeasyPrint/issues/2093>
Fix rounding error when detecting overflows
* _,#2097 <https://github.com/Kozea/WeasyPrint/issues/2097>
_,#2094 <https://github.com/Kozea/WeasyPrint/pull/2094>
_:#1956 <https://github.com/Kozea/WeasyPrint/issues/1956>
Mark use of md5() and sha1() as not for security
* _,#2087 <https://github.com/Kozea/WeasyPrint/pull/2087>
_:#2086 <https://github.com/Kozea/WeasyPrint/pull/2086>
Use CSS table module level 3 to compute widths
* _:#1112 <https://github.com/Kozea/WeasyPrint/issues/1112>
Fix selects with empty values displaying None
* _,#2082 <https://github.com/Kozea/WeasyPrint/issues/2082>
_,#2085 <https://github.com/Kozea/WeasyPrint/pull/2085>
_:016bd81 <https://github.com/Kozea/WeasyPrint/commit/016bd81>
Fix computation for outer min-content width for table cells
* _:
Fix many different bugs with SVG markers
Performance:
* #2130 <https://github.com/Kozea/WeasyPrint/issues/2130>_:
Cache font key instead of whole font content
Documentation:
* #2108 <https://github.com/Kozea/WeasyPrint/pull/2108>_:
Update documentation about CSS leader() function
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Xavid Pretzer
* kygoh
* Germain Gueutier
* Vagner José Nicolodi
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Simon Sapin
* René Fritz
* TrainingSparkle
* Healthchecks.io
* Docraptor
* Yanal-Yves Fargialla
* Douwe van Loenen
* Morntag
* Xavid
Version 61.2
------------
Released on 2024-03-08.
This is a security update.
We strongly recommend to upgrade WeasyPrint to the latest version if you use
WeasyPrint 61.0 or 61.1. Older versions are not impacted.
Security:
- Always use URL fetcher for attachments
Contributors:
* Guillaume Ayoub
* Ilia Novoselov
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* René Fritz
* Simon Sapin
* Arcanite
* TrainingSparkle
* Healthchecks.io
* Hammerbacher
* Docraptor
* Yanal-Yves Fargialla
* Morntag
* NBCO
Version 61.1
------------
Released on 2024-02-26.
Bug fixes:
- #2075 <https://github.com/Kozea/WeasyPrint/issues/2075>_:#2070 <https://github.com/Kozea/WeasyPrint/issues/2070>
Use default value when variable is not defined
- _:
Don’t crash when rendering SVGs with non-text a children
- Don’t crash when SVG file can’t be rendered
Documentation:
- #2067 <https://github.com/Kozea/WeasyPrint/pull/2067>_:
Suggest "dnf" instead of "yum" to install Fedora packages
- Improve documentation for Windows
- Fix required version of TinyCSS2
Contributors:
* Guillaume Ayoub
* Felix Schwarz
* Lucie Anglade
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* René Fritz
* Simon Sapin
* Arcanite
* TrainingSparkle
* Healthchecks.io
* Hammerbacher
* Docraptor
* Yanal-Yves Fargialla
* Morntag
* NBCO
Version 61.0
------------
Released on 2024-02-12.
Python API:
* DocumentMetadata.attachments is now a list of Attachment objects, not
a list of (url, description) tuples.
New features:
* #1219 <https://github.com/Kozea/WeasyPrint/issues/1219>_,#2017 <https://github.com/Kozea/WeasyPrint/pull/2017>
_:#1986 <https://github.com/Kozea/WeasyPrint/issues/1986>
Support var() in shorthand and multiple-value functions
* _:#2050 <https://github.com/Kozea/WeasyPrint/pull/2050>
Support percentages for opacity
* _:#2000 <https://github.com/Kozea/WeasyPrint/pull/2000>
Build executable file for Windows
* _:#1993 <https://github.com/Kozea/WeasyPrint/issues/1993>
Support select fields
* _:#2023 <https://github.com/Kozea/WeasyPrint/issues/2023>
Handle background-attachment: fixed to cover the whole page
* _,#2022 <https://github.com/Kozea/WeasyPrint/pull/2022>
_:#2014 <https://github.com/Kozea/WeasyPrint/pull/2014>
Allow text-based file objects for HTML and CSS classes
* _:
Remove warnings for PDF/A and PDF/UA compatibility
Bug fixes:
* #2052 <https://github.com/Kozea/WeasyPrint/issues/2052>_,#1869 <https://github.com/Kozea/WeasyPrint/pull/1869>
_:#2013 <https://github.com/Kozea/WeasyPrint/issues/2013>
Handle attachments for PDF/A documents
* _,#2051 <https://github.com/Kozea/WeasyPrint/pull/2051>
_:#1278 <https://github.com/Kozea/WeasyPrint/issues/1278>
Apply margin to running tables
* _,#1884 <https://github.com/Kozea/WeasyPrint/pull/1884>
_:#2029 <https://github.com/Kozea/WeasyPrint/issues/2029>
Draw collapsed borders of running tables
* _:#2043 <https://github.com/Kozea/WeasyPrint/pull/2043>
Fix page counter in non-root absolute boxes
* _:#1968 <https://github.com/Kozea/WeasyPrint/issues/1968>
Fix text-anchor on SVG tspan elements
* _,#2039 <https://github.com/Kozea/WeasyPrint/pull/2039>
_:#2030 <https://github.com/Kozea/WeasyPrint/issues/2030>
Use cell's border-height to calculate table row height
* _:#2040 <https://github.com/Kozea/WeasyPrint/issues/2040>
Ensure that bounding box is set to invisible text tags
* _,#2041 <https://github.com/Kozea/WeasyPrint/pull/2041>
_:#2026 <https://github.com/Kozea/WeasyPrint/issues/2026>
Don’t crash on malformed URLs
* _:#2038 <https://github.com/Kozea/WeasyPrint/issues/2038>
Don’t break pages when fixed-height elements don’t overflow page
* _:#2016 <https://github.com/Kozea/WeasyPrint/issues/2016>
Don’t mix original streams when drawing transparent text
* _:#2012 <https://github.com/Kozea/WeasyPrint/issues/2012>
Avoid duplication when breaking out-of-flow boxes
* _:#2010 <https://github.com/Kozea/WeasyPrint/issues/2010>
Don’t crash when CSS properties have no value
* _,#1287 <https://github.com/Kozea/WeasyPrint/issues/1287>
_:#1996 <https://github.com/Kozea/WeasyPrint/issues/1996>
Fix many corner cases with CSS variables
* _:#1982 <https://github.com/Kozea/WeasyPrint/issues/1982>
Don’t crash when drawing groove/ridge collapsed borders
* _:
Fix SVG markers size, position and drawing
Documentation:
* #2021 <https://github.com/Kozea/WeasyPrint/issues/2021>_,#2048 <https://github.com/Kozea/WeasyPrint/pull/2048>
_:
Replace non-virtualenv installation instructions with distribution packages
Contributors:
* Guillaume Ayoub
* kygoh
* Lucie Anglade
* Timo Ramsauer
* Alexander Gitter
* Michael Lisitsa
* Vagner José Nicolodi
* Manolis Stamatogiannakis
* Pascal de Bruijn
* Viktor Shevtsov
* Eduardo Gonzalez
* Kesara Rathnayake
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* René Fritz
* Simon Sapin
* Arcanite
* TrainingSparkle
* Healthchecks.io
* Hammerbacher
* Docraptor
* Yanal-Yves Fargialla
* Morntag
* NBCO
Version 60.2
------------
Released on 2023-12-11.
Bug fixes:
* #1982 <https://github.com/Kozea/WeasyPrint/issues/1982>_:23cfc775 <https://github.com/Kozea/WeasyPrint/commit/23cfc775>
Fix SVG markers size, position and drawing
* _:fe2f0c69 <https://github.com/Kozea/WeasyPrint/commit/fe2f0c69>
Draw background behind absolutely positioned replaced boxes
* _:14605225 <https://github.com/Kozea/WeasyPrint/commit/14605225>
Don’t crash with bitmap fonts with no "glyf" table
* _:
Improve SVG text-anchor attribute
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Nicola Auchmuty
* Syslifters
* Hammerbacher
* TrainingSparkle
* Daniel Kucharski
* Healthchecks.io
* Yanal-Yves Fargialla
* WakaTime
* Paheko
* Synapsium
* DocRaptor
Version 60.1
------------
Released on 2023-09-29.
Bug fixes:
* #1973 <https://github.com/Kozea/WeasyPrint/issues/1973>_:
Fix crash caused by wrong UTF-8 indices
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Nicola Auchmuty
* Syslifters
* Hammerbacher
* TrainingSparkle
* Daniel Kucharski
* Healthchecks.io
* Yanal-Yves Fargialla
* WakaTime
* Paheko
* Synapsium
* DocRaptor
Version 60.0
------------
Released on 2023-09-25.
New features:
* #1903 <https://github.com/Kozea/WeasyPrint/issues/1903>_:#1922 <https://github.com/Kozea/WeasyPrint/pull/1922>
Print form fields
* _:#1965 <https://github.com/Kozea/WeasyPrint/issues/1965>
Add support for textLength and lengthAdjust in SVG text elements
* _:#1970 <https://github.com/Kozea/WeasyPrint/pull/1970>
Handle <wbr> tag
* _:#1909 <https://github.com/Kozea/WeasyPrint/issues/1909>
Handle y offset of glyphs
* _:
Add a --timeout option
Bug fixes:
* #1887 <https://github.com/Kozea/WeasyPrint/pull/1887>_:#1890 <https://github.com/Kozea/WeasyPrint/pull/1890>
Fix footnote-call displayed incorrectly for some fonts
* _:#1908 <https://github.com/Kozea/WeasyPrint/pull/1908>
Fix page-margin boxes layout algorithm
* _:#1906 <https://github.com/Kozea/WeasyPrint/issues/1906>
Fix IndexError when rendering PDF version 1.4
* _:#1915 <https://github.com/Kozea/WeasyPrint/pull/1915>
Apply text transformations to first-letter pseudo elements
* _:#1934 <https://github.com/Kozea/WeasyPrint/pull/1934>
Avoid footnote appearing before its call
* _:#1935 <https://github.com/Kozea/WeasyPrint/issues/1935>
Fix balance before "column-span: all"
* _:#1595 <https://github.com/Kozea/WeasyPrint/issues/1595>
Only draw required glyph with OpenType-SVG fonts
* _:#1895 <https://github.com/Kozea/WeasyPrint/pull/1895>
Don’t draw clipPath when defined after reference
* _:#1899 <https://github.com/Kozea/WeasyPrint/pull/1899>
Don’t ignore min-width when computing cell size
* _:#1936 <https://github.com/Kozea/WeasyPrint/pull/1936>
Fix named pages inheritance
* _:#1943 <https://github.com/Kozea/WeasyPrint/issues/1943>
Avoid page breaks caused by children of overflow hidden boxes
* _:#1946 <https://github.com/Kozea/WeasyPrint/issues/1946>
Use bleed area for page’s painting area
* _:
Use margin box of children to define available width for leaders
Contributors:
* Guillaume Ayoub
* Sahil Rohilla
* Azharuddin Syed
* kygoh
* Andy Lenards
* Gaurav Samudra
* Michael Wedl
* Lucie Anglade
* Obeida Shamoun
* Evgeniy Krysanov
Backers and sponsors:
* Spacinov
* Kobalt
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Nicola Auchmuty
* Syslifters
* Hammerbacher
* TrainingSparkle
* Daniel Kucharski
* Healthchecks.io
* Yanal-Yves Fargialla
* WakaTime
* Paheko
* Synapsium
* DocRaptor
Version 59.0
------------
Released on 2023-05-11.
This version also includes the changes from unstable b1 version listed
below.
Bug fixes:
* #1864 <https://github.com/Kozea/WeasyPrint/issues/1864>_:#1867 <https://github.com/Kozea/WeasyPrint/pull/1867>
Handle overflow for svg and symbol tags in SVG images
* _:d0ad5c1 <https://github.com/Kozea/WeasyPrint/commit/d0ad5c1>
Remove duplicate compression of attachments
* _:93df1a5 <https://github.com/Kozea/WeasyPrint/commit/93df1a5>
Override use tag children instead of drawing their references
* _:#1874 <https://github.com/Kozea/WeasyPrint/pull/1874>
Don’t resize the same image twice when the --dpi option is set
* _:
Drawn underline and overline behind text
Contributors:
* Guillaume Ayoub
* Timo Ramsauer
* Alexander Mankuta
Backers and sponsors:
* Castedo Ellerman
* Kobalt
* Spacinov
* Grip Angebotssoftware
* Crisp BV
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Moritz Mahringer
* Yanal-Yves Fargialla
* Piotr Horzycki
* Healthchecks.io
* TrainingSparkle
* Hammerbacher
* Synapsium
Version 59.0b1
--------------
Released on 2023-04-14.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Command-line API:
* The --optimize-size option and its short equivalent -O have been
deprecated. To activate or deactivate different size optimizations, you can
now use:
* --uncompressed-pdf,
* --optimize-images,
* --full-fonts,
* --hinting,
* --dpi <resolution>, and
* --jpeg-quality <quality>.
* A new --cache-folder <folder> option has been added to store temporary
data in the given folder on the disk instead of keeping them in memory.
Python API:
Global rendering options are now given in *options instead of dedicated
parameters, with slightly different names. It means that the signature of the
HTML.render(), HTML.write_pdf() and Document.write_pdf() has
changed. Here are the steps to port your Python code to v59.0:
1. Use named parameters for these functions, not positioned parameters.
2. Rename some the parameters:
* image_cache becomes cache (see below),
* identifier becomes pdf_identifier,
* variant becomes pdf_variant,
* version becomes pdf_version,
* forms becomes pdf_forms.
* The optimize_size parameter of HTML.render(), HTML.write_pdf()
and Document() has been removed and will be ignored. You can now use the
uncompressed_pdf, full_fonts, hinting, dpi and
jpeg_quality parameters that are included in options.
The cache parameter can be included in *options to replace
image_cache. If it is a dictionary, this dictionary will be used to store
temporary data in memory, and can be even shared between multiple documents.
If it’s a folder Path or string, WeasyPrint stores temporary data in the
given temporary folder on disk instead of keeping them in memory.
New features:
* #1853 <https://github.com/Kozea/WeasyPrint/pull/1853>_,#1854 <https://github.com/Kozea/WeasyPrint/issues/1854>
_:#1824 <https://github.com/Kozea/WeasyPrint/issues/1824>
Reduce PDF size, with financial support from Code & Co.
* _,#1829 <https://github.com/Kozea/WeasyPrint/pull/1829>
_:#1858 <https://github.com/Kozea/WeasyPrint/issues/1858>
Reduce memory use for images
* _:
Add an option to keep hinting information in embedded fonts
Bug fixes:
* #1855 <https://github.com/Kozea/WeasyPrint/issues/1855>_:#1852 <https://github.com/Kozea/WeasyPrint/issues/1852>
Fix position of emojis in justified text
* _:#1843 <https://github.com/Kozea/WeasyPrint/issues/1843>
Don’t crash when line can be split before trailing spaces
* _:#1827 <https://github.com/Kozea/WeasyPrint/issues/1827>
Fix syntax of dates in metadata
* _,#1832 <https://github.com/Kozea/WeasyPrint/pull/1832>
_:
Fix word-spacing problems with nested tags
Documentation:
* #1841 <https://github.com/Kozea/WeasyPrint/issues/1841>_:
Add a paragraph about unsupported calc() function
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Alex Ch
* whi_ne
* Jonas Castro
Backers and sponsors:
* Castedo Ellerman
* Kobalt
* Spacinov
* Grip Angebotssoftware
* Crisp BV
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Moritz Mahringer
* Yanal-Yves Fargialla
* Piotr Horzycki
* Healthchecks.io
* TrainingSparkle
* Hammerbacher
* Synapsium
Version 58.1
------------
Released on 2023-03-07.
Bug fixes:
* #1815 <https://github.com/Kozea/WeasyPrint/issues/1815>_:#1822 <https://github.com/Kozea/WeasyPrint/issues/1822>
Fix bookmarks coordinates
* _,#1823 <https://github.com/Kozea/WeasyPrint/pull/1823>
_:
Fix vertical positioning for absolute replaced elements
Documentation:
* #1814 <https://github.com/Kozea/WeasyPrint/pull/1814>_:
Fix broken link pointing to samples
Contributors:
* Guillaume Ayoub
* Jonas Castro
* Lucie Anglade
* Menelaos Kotoglou
Backers and sponsors:
* Kobalt
* Grip Angebotssoftware
* Spacinov
* Crisp BV
* Castedo Ellerman
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Moritz Mahringer
* Yanal-Yves Fargialla
* Piotr Horzycki
* Healthchecks.io
* Hammerbacher
* TrainingSparkle
* Synapsium
Version 58.0
------------
Released on 2023-02-17.
This version also includes the changes from unstable b1 version listed
below.
Bug fixes:
* #1807 <https://github.com/Kozea/WeasyPrint/issues/1807>_:#1806 <https://github.com/Kozea/WeasyPrint/issues/1806>
Don’t crash when out-of-flow box is split in out-of-flow parent
* _:#1809 <https://github.com/Kozea/WeasyPrint/issues/1809>
Don’t crash when fixed elements aren’t displayed yet in aborted line
* _:
Fix background drawing for out-of-the-page transformed boxes
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Kobalt
* Grip Angebotssoftware
* Crisp BV
* Spacinov
* Castedo Ellerman
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Moritz Mahringer
* Yanal-Yves Fargialla
* Piotr Horzycki
* Healthchecks.io
Version 58.0b1
--------------
Released on 2023-02-03.
This version is experimental, don't use it in production. If you find bugs,
please report them!
New features:
* #61 <https://github.com/Kozea/WeasyPrint/issues/61>_,#1796 <https://github.com/Kozea/WeasyPrint/pull/1796>
_:#1173 <https://github.com/Kozea/WeasyPrint/issues/1173>
Support PDF forms, with financial support from Personalkollen
* _:
Add style for form fields
Bug fixes:
* #1777 <https://github.com/Kozea/WeasyPrint/issues/1777>_:#1771 <https://github.com/Kozea/WeasyPrint/pull/1771>
Detect JPEG/MPO images as normal JPEG files
* _:
Improve SVG gradients
Contributors:
* Guillaume Ayoub
* Lucie Anglade
Backers and sponsors:
* Kobalt
* Grip Angebotssoftware
* Crisp BV
* Spacinov
* Castedo Ellerman
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* NCC Group
* René Fritz
* Moritz Mahringer
* Yanal-Yves Fargialla
* Piotr Horzycki
* Healthchecks.io
Version 57.2
------------
Released on 2022-12-23.
Bug fixes:
* 0f2e377 <https://github.com/Kozea/WeasyPrint/commit/0f2e377>_:0e9426f <https://github.com/Kozea/WeasyPrint/commit/0e9426f>
Print annotations with PDF/A
* _:#1764 <https://github.com/Kozea/WeasyPrint/issues/1764>
Hide annotations with PDF/UA
* _:#1783 <https://github.com/Kozea/WeasyPrint/pull/1783>
Use reference instead of stream for annotation appearance stream
* _:
Fix multiple font weights for @font-face declarations
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Tom Pohl
* Castedo Ellerman
* Moritz Mahringer
* Piotr Horzycki
* Gábor Nyers
* Sidharth Kapur
Version 57.1
------------
Released on 2022-11-04.
Dependencies:
* #1754 <https://github.com/Kozea/WeasyPrint/pull/1754>_:
Pillow 9.1.0 is now needed
Bug fixes:
* #1756 <https://github.com/Kozea/WeasyPrint/pull/1756>_:#1755 <https://github.com/Kozea/WeasyPrint/issues/1755>
Fix rem font size for SVG images
* _:#1753 <https://github.com/Kozea/WeasyPrint/issues/1753>
Keep format when transposing images
* _:
Don’t use deprecated read_text function when files is available#1741 <https://github.com/Kozea/WeasyPrint/issues/1741>
* _:#1747 <https://github.com/Kozea/WeasyPrint/issues/1747>
Generate better manpage
* _:#1748 <https://github.com/Kozea/WeasyPrint/issues/1748>
Correctly set target counters in pages’ absolute elements
* _:2b05137 <https://github.com/Kozea/WeasyPrint/commit/2b05137>
Always set font size when font is changed in line
* _:
Fix stability of font identifiers
Documentation:
* #1750 <https://github.com/Kozea/WeasyPrint/pull/1750>_:
Fix documentation spelling
Contributors:
* Guillaume Ayoub
* Eli Schwartz
* Mikhail Anikin
* Scott Kitterman
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Tom Pohl
* John R Ellis
* Castedo Ellerman
* Moritz Mahringer
* Gábor
* Piotr Horzycki
Version 57.0
------------
Released on 2022-10-18.
This version also includes the changes from unstable b1 version listed
below.
New features:
* a4fc7a1 <https://github.com/Kozea/WeasyPrint/commit/a4fc7a1>_:
Support image-orientation
Bug fixes:
* #1739 <https://github.com/Kozea/WeasyPrint/issues/1739>_:#1740 <https://github.com/Kozea/WeasyPrint/issues/1740>
Set baseline on all flex containers
* _:#1718 <https://github.com/Kozea/WeasyPrint/issues/1718>
Don’t crash when currentColor is set on root svg tag
* _:#1736 <https://github.com/Kozea/WeasyPrint/issues/1736>
Don’t crash with empty bitmap glyphs
* _:eef8b4d <https://github.com/Kozea/WeasyPrint/commit/eef8b4d>
Always use the font’s vector variant when possible
* _:#1662 <https://github.com/Kozea/WeasyPrint/issues/1662>
Always set color and state before drawing
* _:#1733 <https://github.com/Kozea/WeasyPrint/issues/1733>
Use a stable key to store stream fonts
* _:3c4fa50 <https://github.com/Kozea/WeasyPrint/commit/3c4fa50>
Don’t remove attachments when adding internal anchors
* _,c215697 <https://github.com/Kozea/WeasyPrint/commit/c215697>
_,d275dac <https://github.com/Kozea/WeasyPrint/commit/d275dac>
_,b04bfff <https://github.com/Kozea/WeasyPrint/commit/b04bfff>
_:
Fix many bugs related to PDF/UA structure
Performance:
* dfccf1b <https://github.com/Kozea/WeasyPrint/commit/dfccf1b>_:0dc12b6 <https://github.com/Kozea/WeasyPrint/commit/0dc12b6>
Use faces as fonts dictionary keys
* _:75e17bf <https://github.com/Kozea/WeasyPrint/commit/75e17bf>
Cache add_font to avoid calling get_face too often
* _:498d3e1 <https://github.com/Kozea/WeasyPrint/commit/498d3e1>
Don’t call process_whitespace twice on many children
* _:
Optimize __missing__ functions
Documentation:
* 863b3d6 <https://github.com/Kozea/WeasyPrint/commit/863b3d6>_:
Update documentation of installation on macOS with Homebrew
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Tom Pohl
* John R Ellis
* Castedo Ellerman
* Moritz Mahringer
* Gábor
* Piotr Horzycki
Version 57.0b1
--------------
Released on 2022-09-22.
This version is experimental, don't use it in production. If you find bugs,
please report them!
New features:
* #1704 <https://github.com/Kozea/WeasyPrint/pull/1704>_:#1454 <https://github.com/Kozea/WeasyPrint/issues/1454>
Support PDF/UA, with financial support from Novareto
* _:
Support variable fonts
Bug fixes:
* #1058 <https://github.com/Kozea/WeasyPrint/issues/1058>_:#1707 <https://github.com/Kozea/WeasyPrint/issues/1707>
Fix bullet position after page break, with financial support from OpenZeppelin
* _:#1722 <https://github.com/Kozea/WeasyPrint/issues/1722>
Fix footnote positioning in multicolumn layout, with financial support from Code & Co.
* _:#1715 <https://github.com/Kozea/WeasyPrint/issues/1715>
Handle skew transformation with only one parameter
* _:#1697 <https://github.com/Kozea/WeasyPrint/issues/1697>
Don’t crash when images are truncated
* _:#1695 <https://github.com/Kozea/WeasyPrint/pull/1695>
Don’t crash when attr() is used in text-decoration-color
* _:#1612 <https://github.com/Kozea/WeasyPrint/issues/1612>
Include language information in PDF metadata
* _:#1700 <https://github.com/Kozea/WeasyPrint/issues/1700>
Don’t lowercase letters when capitalizing text
* _:#1667 <https://github.com/Kozea/WeasyPrint/issues/1667>
Fix crash when rendering footnote with repagination
* _:#1669 <https://github.com/Kozea/WeasyPrint/issues/1669>
Follow EXIF metadata for image rotation
* _:#1638 <https://github.com/Kozea/WeasyPrint/issues/1638>
Take care of floats when remvoving placeholders
* _:
Use the original box when breaking waiting children
Contributors:
* Guillaume Ayoub
* Konstantin Weddige
* VeteraNovis
* Lucie Anglade
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Tom Pohl
* John R Ellis
* Moritz Mahringer
* Gábor
* Piotr Horzycki
* Andrew Ittner
Version 56.1
------------
Released on 2022-07-24.
Bug fixes:
* #1674 <https://github.com/Kozea/WeasyPrint/issues/1674>_:#1678 <https://github.com/Kozea/WeasyPrint/issues/1678>
Follow max-height on footnot area, with financial support from Code & Co.
* _:
Fix gradients with opacity set
Contributors:
* Guillaume Ayoub
* Lucie Anglade
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
* Andrew Ittner
Version 56.0
------------
Released on 2022-07-07.
This version also includes the changes from unstable b1 version listed
below.
New features:
* 70f9b62 <https://github.com/Kozea/WeasyPrint/commit/70f9b62>_:
Support format 5 for bitmap glyphs
Bug fixes:
* #1666 <https://github.com/Kozea/WeasyPrint/issues/1666>_#1668 <https://github.com/Kozea/WeasyPrint/issues/1668>
Fix reproducible PDF generation with embedded images
* _:3bd9a8e <https://github.com/Kozea/WeasyPrint/commit/3bd9a8e>
Fix @page:nth() selector
* _:cb9540b <https://github.com/Kozea/WeasyPrint/commit/cb9540b>
Don’t limit the opacity groups to the original box size
* _,76d174f <https://github.com/Kozea/WeasyPrint/commit/76d174f>
_,9ce6547 <https://github.com/Kozea/WeasyPrint/commit/9ce6547>
_:
Minor bugfixes for split table rows
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Des images et des mots
* Andreas Zettl
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
Version 56.0b1
--------------
Released on 2022-06-17.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Dependencies:
* pydyf 0.2.0+ is now needed
New features:
* #1660 <https://github.com/Kozea/WeasyPrint/pull/1660>_:#1644 <https://github.com/Kozea/WeasyPrint/pull/1644>
Support nested line-clamp, with financial support from Expert Germany
* _,#1645 <https://github.com/Kozea/WeasyPrint/issues/1645>
_:#1651 <https://github.com/Kozea/WeasyPrint/pull/1651>
Support bitmap fonts, with financial support from Expert Germany
* _,#630 <https://github.com/Kozea/WeasyPrint/issues/630>
_:
Support PDF/A, with financial support from Blueshoe
Bug fixes:
* #1656 <https://github.com/Kozea/WeasyPrint/issues/1656>_:#1028 <https://github.com/Kozea/WeasyPrint/issues/1028>
Fix chained variables in the same selector block
* _:#1653 <https://github.com/Kozea/WeasyPrint/issues/1653>
Fix font weight management in @font-face rules
* _:#1650 <https://github.com/Kozea/WeasyPrint/issues/1650>
Don’t crash when @font-face’s src ends with a comma
* _:e38bff8 <https://github.com/Kozea/WeasyPrint/commit/e38bff8>
Don’t check origin when URL only contains fragment
* _:
Don’t crash when inherited SVG attributes are not set on the parent
Performance:
* e6021da <https://github.com/Kozea/WeasyPrint/commit/e6021da>_:
Launch tests in parallel by default
Contributors:
* Guillaume Ayoub
* aschmitz
* Lucie Anglade
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Des images et des mots
* Andreas Zettl
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
Version 55.0
------------
Released on 2022-05-12.
This version also includes the changes from unstable b1 version listed
below.
Bug fixes:
* #1626 <https://github.com/Kozea/WeasyPrint/issues/1626>_,3802f88 <https://github.com/Kozea/WeasyPrint/commit/3802f88>
_:9641098 <https://github.com/Kozea/WeasyPrint/commit/9641098>
Fix the vertical position and available height of absolute boxes
* _,e5e6b88 <https://github.com/Kozea/WeasyPrint/commit/e5e6b88>
_:0fcc7de <https://github.com/Kozea/WeasyPrint/commit/0fcc7de>
Minor fixes for multi-column layout
* _:#1636 <https://github.com/Kozea/WeasyPrint/pull/1636>
Don’t stop rendering SVG when CSS parsing fails
* _:#1637 <https://github.com/Kozea/WeasyPrint/issues/1637>
Fix sequential footnotes that could disappear when overflowing
* _:#1641 <https://github.com/Kozea/WeasyPrint/issues/1641>
Fix position of absolute boxes with right-to-left direction
* _:
Fix relative paths for SVG files stored as data URLs
Contributors:
* Guillaume Ayoub
* aschmitz
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* Spacinov
* KontextWork
* René Fritz
* NCC Group
* Kobalt
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
Version 55.0b1
--------------
Released on 2022-04-15.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Dependencies:
* Python 3.7+ is now needed, Python 3.6 is not supported anymore
New features:
* #1534 <https://github.com/Kozea/WeasyPrint/pull/1534>_:
Support word-break: break-all#489 <https://github.com/Kozea/WeasyPrint/issues/489>
* _,#1619 <https://github.com/Kozea/WeasyPrint/pull/1619>
_:#1553 <https://github.com/Kozea/WeasyPrint/issues/1553>
Support column breaks
* _:
Allow reproducible PDF generation
Bug fixes:
* #1007 <https://github.com/Kozea/WeasyPrint/issues/1007>_,#1524 <https://github.com/Kozea/WeasyPrint/pull/1524>
_:
Handle inherit in shorthand properties#1539 <https://github.com/Kozea/WeasyPrint/issues/1539>
* _,#1541 <https://github.com/Kozea/WeasyPrint/pull/1541>
_:#1554 <https://github.com/Kozea/WeasyPrint/pull/1554>
Space out no-repeat patterns
* _:#1564 <https://github.com/Kozea/WeasyPrint/issues/1564>
Avoid invalid PDF operators when drawing SVG text
* _,#1566 <https://github.com/Kozea/WeasyPrint/pull/1566>
_,#1570 <https://github.com/Kozea/WeasyPrint/pull/1570>
_:#1020 <https://github.com/Kozea/WeasyPrint/issues/1020>
Don’t output footnotes before their call sites
* _,#1597 <https://github.com/Kozea/WeasyPrint/pull/1597>
_:#1512 <https://github.com/Kozea/WeasyPrint/issues/1512>
Prevent infinite loops in multi-column layout
* _,#1613 <https://github.com/Kozea/WeasyPrint/pull/1613>
_:#1093 <https://github.com/Kozea/WeasyPrint/issues/1093>
Fix position of absolute boxes in right-to-left contexts
* _:#984 <https://github.com/Kozea/WeasyPrint/issues/984>
Draw borders around absolute replaced boxes
* _,#1604 <https://github.com/Kozea/WeasyPrint/issues/1604>
_:#1621 <https://github.com/Kozea/WeasyPrint/issues/1621>
Fix skip stacks for columns
* _:
Better support of nested text-decoration propertiesfe1f3d9 <https://github.com/Kozea/WeasyPrint/commit/fe1f3d9>
* _:4650b70 <https://github.com/Kozea/WeasyPrint/commit/4650b70>
Fix absolute blocks in lines
* _:
Clear adjoining margins when a container’s child doesn’t fit
Performance:
* #1548 <https://github.com/Kozea/WeasyPrint/pull/1548>_:3b0ae92 <https://github.com/Kozea/WeasyPrint/commit/3b0ae92>
Improve tests speed
* _,#1457 <https://github.com/Kozea/WeasyPrint/issues/1457>
_:#1597 <https://github.com/Kozea/WeasyPrint/pull/1597>
Improve fonts management
* _:#1587 <https://github.com/Kozea/WeasyPrint/pull/1587>
Improve column layout speed
* _,#1607 <https://github.com/Kozea/WeasyPrint/pull/1607>
_,#1608 <https://github.com/Kozea/WeasyPrint/pull/1608>
_:
Cache ch and ex units calculations
Contributors:
* Guillaume Ayoub
* aschmitz
* Lucie Anglade
* Christoph Kepper
* Jack Lin
* Rian McGuire
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* KontextWork
* Maykin Media
* René Fritz
* NCC Group
* Spacinov
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Kobalt
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
* DeivGuerrero
Version 54.3
------------
Released on 2022-04-04.
Bug fixes:
* #1588 <https://github.com/Kozea/WeasyPrint/pull/1588>_:#1586 <https://github.com/Kozea/WeasyPrint/issues/1586>
Support position: absolute in footnotes
* _:
Fix discarded text-align values
Contributors:
* aschmitz
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* KontextWork
* Maykin Media
* René Fritz
* NCC Group
* Spacinov
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Kobalt
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
* DeivGuerrero
Version 54.2
------------
Released on 2022-02-27.
Bug fixes:
* #1575 <https://github.com/Kozea/WeasyPrint/issues/1575>_:#1574 <https://github.com/Kozea/WeasyPrint/issues/1574>
Always store parent blocks children as lists
* _,#1559 <https://github.com/Kozea/WeasyPrint/pull/1559>
_:#1571 <https://github.com/Kozea/WeasyPrint/issues/1571>
Fix float rounding errors
* _:#1561 <https://github.com/Kozea/WeasyPrint/issues/1561>
Ignore unknown glyphs
* _,#1562 <https://github.com/Kozea/WeasyPrint/issues/1562>
_:#1560 <https://github.com/Kozea/WeasyPrint/issues/1560>
Fix line break when breaks occur between a nbsp and an inline block
* _:#1558 <https://github.com/Kozea/WeasyPrint/issues/1558>
Always set the child index
* _:
Fix patterns with use tags
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Jack Lin
* aschmitz
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* Crisp BV
* SimonSoft
* Menutech
* KontextWork
* Maykin Media
* René Fritz
* NCC Group
* Spacinov
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Kobalt
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
* DeivGuerrero
Version 54.1
------------
Released on 2022-01-31.
New features:
* #1547 <https://github.com/Kozea/WeasyPrint/issues/1547>_:
Handle break-inside: avoid on tr tags
Bug fixes:
* #1540 <https://github.com/Kozea/WeasyPrint/issues/1540>_,#1239 <https://github.com/Kozea/WeasyPrint/issues/1239>
_:#1538 <https://github.com/Kozea/WeasyPrint/issues/1538>
Handle absolute children in running elements
* _:#1536 <https://github.com/Kozea/WeasyPrint/issues/1536>
Handle invalid values in text-align
* _:
Handle absolute flex boxes
Contirbutors:
* Guillaume Ayoub
* Lucie Anglade
Backers and sponsors:
* H-Net: Humanities and Social Sciences Online
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Crisp BV
* Maykin Media
* René Fritz
* Simon Sapin
* NCC Group
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Spacinov
* Des images et des mots
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
Version 54.0
------------
Released on 2022-01-08.
This version also includes the changes from unstable b1 version listed
below.
Bug fixes:
* #1531 <https://github.com/Kozea/WeasyPrint/issues/1531>_:#1523 <https://github.com/Kozea/WeasyPrint/issues/1523>
Always use absolute paths to get hrefs in SVG
* _:e1aee70 <https://github.com/Kozea/WeasyPrint/commit/e1aee70>
Fix many rendering problems of broken tables
* _:
Fix support of fonts with SVG emojis
Contirbutors:
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Crisp BV
* Maykin Media
* René Fritz
* Simon Sapin
* NCC Group
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Des images et des mots
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
Version 54.0b1
--------------
Released on 2021-12-13.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Dependencies:
* html5lib 1.1+ is now needed.
New features:
* #1509 <https://github.com/Kozea/WeasyPrint/pull/1509>_:#36 <https://github.com/Kozea/WeasyPrint/issues/36>
Support footnotes, with financial support from Code & Co.
* _:#1389 <https://github.com/Kozea/WeasyPrint/pull/1389>
Handle parallel flows for floats, absolutes, table-cells
* _:
Support text-align-last and text-align-all properties#1434 <https://github.com/Kozea/WeasyPrint/pull/1434>
* _:#1520 <https://github.com/Kozea/WeasyPrint/pull/1520>
Draw SVG and PNG emojis
* _:
Support overflow-wrap: anywhere#1435 <https://github.com/Kozea/WeasyPrint/issues/1435>
* _:
Add environment variable to set DLL folder on Windows
Performance:
* #1439 <https://github.com/Kozea/WeasyPrint/issues/1439>_:
Cache SVG use tags#1481 <https://github.com/Kozea/WeasyPrint/pull/1481>
* _:
Encode non-JPEG images as PNGs instead of JPEG2000s
Bug fixes:
* #137 <https://github.com/Kozea/WeasyPrint/issues/137>_:
Don’t use text-transform text for content-based uses#1443 <https://github.com/Kozea/WeasyPrint/issues/1443>
* _:#607 <https://github.com/Kozea/WeasyPrint/issues/607>
Don’t serialize and parse again inline SVG files
* _:#1094 <https://github.com/Kozea/WeasyPrint/issues/1094>
Correctly handle whitespaces in bookmark labels
* _:
Fix column height with column-span content#1473 <https://github.com/Kozea/WeasyPrint/issues/1473>
* _:#1491 <https://github.com/Kozea/WeasyPrint/issues/1491>
Fix absolutely positioned boxes in duplicated pages
* _:
Fix target-counter attribute in flex items#1515 <https://github.com/Kozea/WeasyPrint/issues/1515>
* _,#1508 <https://github.com/Kozea/WeasyPrint/issues/1508>
_:#1499 <https://github.com/Kozea/WeasyPrint/issues/1499>
Don’t draw empty glyphs
* _:
Don’t crash when font size is really small
Documentation:
* #1519 <https://github.com/Kozea/WeasyPrint/issues/1519>_:
Fix typo
Packaging:
* The source package does not include a setup.py file anymore. You can findissue #1410 <https://github.com/Kozea/WeasyPrint/issues/1410>
more information about this in
_.
Contirbutors:
* Guillaume Ayoub
* Lucie Anglade
* Colin Kinloch
* aschmitz
* Pablo González
* Rian McGuire
Backers and sponsors:
* Grip Angebotssoftware
* Manuel Barkhau
* SimonSoft
* Menutech
* KontextWork
* Crisp BV
* Maykin Media
* René Fritz
* Simon Sapin
* NCC Group
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Des images et des mots
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* Gábor
* Piotr Horzycki
Version 53.4
------------
Released on 2021-11-14.
Bug fixes:
* #1446 <https://github.com/Kozea/WeasyPrint/issues/1446>_:#1455 <https://github.com/Kozea/WeasyPrint/issues/1455>
Fix background on pages with a bleed property
* _:#1469 <https://github.com/Kozea/WeasyPrint/issues/1469>
Use SVG width/height as inner size when no viewBox is given
* _:#1471 <https://github.com/Kozea/WeasyPrint/issues/1471>
Only enable letter- and word-spacing when needed
* _:#1485 <https://github.com/Kozea/WeasyPrint/issues/1485>
Don’t display inputs with "hidden" type
* _:#1486 <https://github.com/Kozea/WeasyPrint/issues/1486>
Allow quotes in url() syntax for SVG,
Use better approximations for font ascent and descent values in SVG
* _:#1489 <https://github.com/Kozea/WeasyPrint/issues/1489>
Fix images embedded from multiple pages
* _:abd54c4 <https://github.com/Kozea/WeasyPrint/commit/abd54c4>
Use a better hash for fonts to avoid collisions
* _:
Set SVG ratio when width and height are 0
Contributors:
* Guillaume Ayoub
* Lucie Anglade
Backers and sponsors:
* Grip Angebotssoftware
* SimonSoft
* Menutech
* Manuel Barkhau
* Simon Sapin
* KontextWork
* René Fritz
* Maykin Media
* NCC Group
* Crisp BV
* Des images et des mots
* Andreas Zettl
* Nathalie Gutton
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
* G. Allard
* Gábor
Version 53.3
------------
Released on 2021-09-10.
Bug fixes:
* #1431 <https://github.com/Kozea/WeasyPrint/issues/1431>_,#1440 <https://github.com/Kozea/WeasyPrint/issues/1440>
_:#1430 <https://github.com/Kozea/WeasyPrint/issues/1430>
Fix crashes and malformed PDF files
* _:#1436 <https://github.com/Kozea/WeasyPrint/pull/1436>
Handle cx and cy in SVG rotations
* _:
Fix marker-start being drawn on mid vertices
Contributors:
* Guillaume Ayoub
* Rian McGuire
* Lucie Anglade
Backers and sponsors:
* Grip Angebotssoftware
* SimonSoft
* Menutech
* Manuel Barkhau
* Simon Sapin
* KontextWork
* René Fritz
* Maykin Media
* NCC Group
* Des images et des mots
* Andreas Zettl
* Nathalie Gutton
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
Version 53.2
------------
Released on 2021-08-27.
New features:
* #1428 <https://github.com/Kozea/WeasyPrint/issues/1428>_:
Re-add the make_bookmark_tree() method
Bug fixes:
* #1429 <https://github.com/Kozea/WeasyPrint/issues/1429>_:
Fix package deployed on PyPI
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* PDF Blocks
* SimonSoft
* Menutech
* Manuel Barkhau
* Simon Sapin
* KontextWork
* René Fritz
* Maykin Media
* NCC Group
* Des images et des mots
* Andreas Zettl
* Nathalie Gutton
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
Version 53.1
------------
Released on 2021-08-22.
Bug fixes:
* #1409 <https://github.com/Kozea/WeasyPrint/issues/1409>_:#1414 <https://github.com/Kozea/WeasyPrint/issues/1414>
Don’t crash when leaders are in floats
* _:#1417 <https://github.com/Kozea/WeasyPrint/issues/1417>
Embed images once
* _:
Fix crash with SVG intrinsic ratio
Documentation:
* #1422 <https://github.com/Kozea/WeasyPrint/issues/1422>_:
Include weasyprint.tools removal in documentation
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Grip Angebotssoftware
* PDF Blocks
* SimonSoft
* Menutech
* Manuel Barkhau
* Simon Sapin
* KontextWork
* René Fritz
* Maykin Media
* NCC Group
* Des images et des mots
* Andreas Zettl
* Nathalie Gutton
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* Yanal-Yves Fargialla
Version 53.0
------------
Released on 2021-07-31.
This version also includes the changes from unstable b1 and b2 versions listed
below.
Dependencies:
* Pango 1.44.0+ is now needed.
* pydyf 0.0.3+ is now needed.
* fontTools 4.0.0+ is now needed.
* html5lib 1.0.1+ is now needed.
API changes:
* FontConfiguration is now in the weasyprint.text.fonts module.
* --format and --resolution options have been deprecated, PDF is the
only output format supported.
* --optimize-images option has been deprecated and replaced by
--optimize-size, allowing images, fonts, all and none
values.
* weasyprint.tools have been removed.
* Document.resolve_links, Document.make_bookmark_tree and
Document.add_hyperlinks have been removed.
Performance:
* Improve image management
New features:
* #1374 <https://github.com/Kozea/WeasyPrint/issues/1374>_:
Support basic "clipPath" in SVG
Bug fixes:
* #1369 <https://github.com/Kozea/WeasyPrint/issues/1369>_:#1370 <https://github.com/Kozea/WeasyPrint/issues/1370>
Render use path in SVG
* _:#1371 <https://github.com/Kozea/WeasyPrint/issues/1371>
Fix fill color on use path in SVG
* _:#1378 <https://github.com/Kozea/WeasyPrint/issues/1378>
Handle stroke-opacity and fill-opacity
* _:#1394 <https://github.com/Kozea/WeasyPrint/issues/1394>
Fix crash with borders whose widths are in em
* _:#880 <https://github.com/Kozea/WeasyPrint/issues/880>
Fix crash on draw_pattern
* _:#1386 <https://github.com/Kozea/WeasyPrint/issues/1386>
Handle stacking contexts put in contexts by previous generations
* _:#1403 <https://github.com/Kozea/WeasyPrint/issues/1403>
Catch font subsetting errors
* _:#1399 <https://github.com/Kozea/WeasyPrint/issues/1399>
Fix how x and y attributes are handled in SVG
* _,#1401 <https://github.com/Kozea/WeasyPrint/pull/1401>
_:#1393 <https://github.com/Kozea/WeasyPrint/issues/1393>
Don’t crash when use tags reference non-existing element
* _:#1408 <https://github.com/Kozea/WeasyPrint/issues/1408>
Handle font collections
* _:
Handle x and y attributes in use tags
Documentation:
* #1391 <https://github.com/Kozea/WeasyPrint/issues/1391>_,#1405 <https://github.com/Kozea/WeasyPrint/pull/1405>
_:
Add documentation for installation
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Pelle Bo Regener
* aschmitz
* John Jackson
* Felix Schwarz
* Syrus Dark
* Christoph Päper
Backers and sponsors:
* OpenEdition
* Grip Angebotssoftware
* Simonsoft
* PDF Blocks
* Menutech
* Manuel Barkhau
* print-css.rocks
* Simon Sapin
* KontextWork
* René Fritz
* Maykin Media
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* NCC Group
* Moritz Mahringer
* Florian Demmer
* Des images et des mots
* Mohammed Y. Alnajdi
* Yanal-Yves Fargialla
* Yevhenii Hyzyla
Version 53.0b2
--------------
Released on 2021-05-30.
This version is experimental, don't use it in production. If you find bugs,
please report them!
New features:
* #359 <https://github.com/Kozea/WeasyPrint/issues/359>_:
Embed full sets of fonts in PDF
Bug fixes:
* #1345 <https://github.com/Kozea/WeasyPrint/issues/1345>_:#1346 <https://github.com/Kozea/WeasyPrint/pull/1346>
Fix position of SVG use tags
* _:#1352 <https://github.com/Kozea/WeasyPrint/issues/1352>
Handle "stroke-dasharray: none"
* _,#1358 <https://github.com/Kozea/WeasyPrint/pull/1358>
_:#1357 <https://github.com/Kozea/WeasyPrint/issues/1357>
Sort link target identifiers
* _:#1362 <https://github.com/Kozea/WeasyPrint/issues/1362>
Fix font information
* _:#1365 <https://github.com/Kozea/WeasyPrint/issues/1365>
Handle visibility and display properties in SVG
* _:#1366 <https://github.com/Kozea/WeasyPrint/issues/1366>
Cascade inherited attributes for use tags
* _:#1367 <https://github.com/Kozea/WeasyPrint/issues/1367>
Correctly handle style attributes in SVG
* _:
Include line stroke in box bounding
Documentation:
* #1341 <https://github.com/Kozea/WeasyPrint/pull/1341>_:
Fix typos
Contributors:
* Guillaume Ayoub
* aschmitz
* John Jackson
* Lucie Anglade
* Pelle Bo Regener
Backers and sponsors:
* OpenEdition
* print-css.rocks
* Simonsoft
* PDF Blocks
* Menutech
* Manuel Barkhau
* Simon Sapin
* Grip Angebotssoftware
* KontextWork
* René Fritz
* Nathalie Gutton
* Andreas Zettl
* Tom Pohl
* Maykin Media
* Moritz Mahringer
* Florian Demmer
* Mohammed Y. Alnajdi
* NCC Group
* Des images et des mots
* Yanal-Yves Fargialla
* Yevhenii Hyzyla
Version 53.0b1
--------------
Released on 2021-04-22.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Dependencies:
* This version uses its own PDF generator instead of Cairo. Rendering may be
different for text, gradients, SVG images…
* Packaging is now done with Flit.
New features:
* #1328 <https://github.com/Kozea/WeasyPrint/pull/1328>_:#1309 <https://github.com/Kozea/WeasyPrint/pull/1309>
Add ISO and JIS paper sizes
* _:
Leader support, with financial support from Simonsoft
Bug fixes:
* #504 <https://github.com/Kozea/WeasyPrint/issues/504>_:#606 <https://github.com/Kozea/WeasyPrint/issues/606>
Fix rendering bugs with PDF gradients
* _:#1264 <https://github.com/Kozea/WeasyPrint/issues/1264>
Fix rounding errors on PDF dimensions
* _:#1191 <https://github.com/Kozea/WeasyPrint/issues/1191>
Include witdh/height when calculating auto margins of absolute boxes
* _:#1235 <https://github.com/Kozea/WeasyPrint/issues/1235>
Don’t try to get an earlier page break between columns
* _:#1199 <https://github.com/Kozea/WeasyPrint/issues/1199>
Include padding, border, padding when calculating inline-block width
* _:
Fix kerning issues with small fonts
Documentation:
* #1298 <https://github.com/Kozea/WeasyPrint/pull/1298>_:
Rewrite documentation
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Felix Schwarz
* Syrus Dark
* Christoph Päper
Backers and sponsors:
* Simonsoft
* PDF Blocks
* Menutech
* Manuel Barkhau
* Simon Sapin
* Nathalie Gutton
* Andreas Zettl
* René Fritz
* Tom Pohl
* KontextWork
* Moritz Mahringer
* Florian Demmer
* Maykin Media
* Yanal-Yves Fargialla
* Des images et des mots
* Yevhenii Hyzyla
Version 52.5
------------
Released on 2021-04-17.
Bug fixes:
* #1336 <https://github.com/Kozea/WeasyPrint/issues/1336>_:#1318 <https://github.com/Kozea/WeasyPrint/issues/1318>
Fix text breaking exception
* _:
Fix @font-face rules with Pango 1.48.3+
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Simonsoft
* PDF Blocks
* Menutech
* Manuel Barkhau
* Simon Sapin
* Nathalie Gutton
* Andreas Zettl
* René Fritz
* Tom Pohl
* KontextWork
* Moritz Mahringer
* Florian Demmer
* Maykin Media
* Yanal-Yves Fargialla
* Des images et des mots
* Yevhenii Hyzyla
Version 52.4
------------
Released on 2021-03-11.
Bug fixes:
* #1304 <https://github.com/Kozea/WeasyPrint/issues/1304>_:ece5f066 <https://github.com/Kozea/WeasyPrint/commit/ece5f066>
Don’t try to draw SVG files with no size
* _:4ee42e48 <https://github.com/Kozea/WeasyPrint/commit/4ee42e48>
Avoid crash on last word detection
* _:
Remove last word before ellipses when hyphenated
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* PDF Blocks
* Simonsoft
* Menutech
* Simon Sapin
* Manuel Barkhau
* Andreas Zettl
* Nathalie Gutton
* Tom Pohl
* René Fritz
* Moritz Mahringer
* Florian Demmer
* KontextWork
* Michele Mostarda
Version 52.3
------------
Released on 2021-03-02.
Bug fixes:
* #1299 <https://github.com/Kozea/WeasyPrint/issues/1299>_:
Fix imports with url() and quotes
New features:
* #1300 <https://github.com/Kozea/WeasyPrint/pull/1300>_:
Add support of line-clamp, with financial support from
expert Germany
Contributors:
* Guillaume Ayoub
* Lucie Anglade
Backers and sponsors:
* PDF Blocks
* Simonsoft
* Menutech
* Simon Sapin
* Manuel Barkhau
* Andreas Zettl
* Nathalie Gutton
* Tom Pohl
* Moritz Mahringer
* Florian Demmer
* KontextWork
* Michele Mostarda
Version 52.2
------------
Released on 2020-12-06.
Bug fixes:
* 238e214 <https://github.com/Kozea/WeasyPrint/commit/238e214>_:#1248 <https://github.com/Kozea/WeasyPrint/issues/1248>
Fix URL handling with tinycss2
* _:#1254 <https://github.com/Kozea/WeasyPrint/issues/1254>
Include missing test data
* _:#1250 <https://github.com/Kozea/WeasyPrint/issues/1250>
Top margins removed from children when tables are displayed on multiple pages
* _:a6f9c80 <https://github.com/Kozea/WeasyPrint/commit/a6f9c80>
Correctly draw borders on the last line of split tables
* _:
Add a nice gif to please gdk-pixbuf 2.42.0
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Felix Schwarz
Backers and sponsors:
* PDF Blocks
* Simonsoft
* Menutech
* Simon Sapin
* Nathalie Gutton
* Andreas Zetti
* Tom Pohl
* Florian Demmer
* Moritz Mahringer
Version 52.1
------------
Released on 2020-11-02.
Bug fixes:
* 238e214 <https://github.com/Kozea/WeasyPrint/commit/238e214>_:
Fix URL handling with tinycss2
Contributors:
* Guillaume Ayoub
Backers and sponsors:
* Simonsoft
* Simon Sapin
* Nathalie Gutton
* Andreas Zettl
* Florian Demmer
* Moritz Mahringer
Version 52
----------
Released on 2020-10-29.
Dependencies:
* Python 3.6+ is now needed, Python 3.5 is not supported anymore
* WeasyPrint now depends on Pillow
New features:
* #1019 <https://github.com/Kozea/WeasyPrint/issues/1019>_:
Implement counter-set#1080 <https://github.com/Kozea/WeasyPrint/issues/1080>
* _:
Don’t display template tags#1210 <https://github.com/Kozea/WeasyPrint/pull/1210>
* _:
Use download attribute in a tags for attachment's filename#1206 <https://github.com/Kozea/WeasyPrint/issues/1206>
* _:
Handle strings in list-style-type#1165 <https://github.com/Kozea/WeasyPrint/pull/1165>
* _:
Add support for concatenating var() functions in content declarationsc56b96b <https://github.com/Kozea/WeasyPrint/commit/c56b96b>
* _:#969 <https://github.com/Kozea/WeasyPrint/issues/969>
Add an option to optimize embedded images size, with financial support from
Hashbang
* _:
Add an image cache that can be shared between documents, with financial
support from Hashbang
Bug fixes:
* #1141 <https://github.com/Kozea/WeasyPrint/pull/1141>_:
Don’t clip page margins on account of body overflow#1000 <https://github.com/Kozea/WeasyPrint/issues/1000>
* _:
Don’t apply text-indent twice on inline blocks#1051 <https://github.com/Kozea/WeasyPrint/issues/1051>
* _:#1120 <https://github.com/Kozea/WeasyPrint/pull/1120>
Avoid random line breaks
* _:#1110 <https://github.com/Kozea/WeasyPrint/issues/1110>
Gather target counters in page margins
* _:#1111 <https://github.com/Kozea/WeasyPrint/issues/1111>
Handle most cases for boxes avoiding floats in rtl containers, with financial
support from Innovative Software
* _:#1114 <https://github.com/Kozea/WeasyPrint/issues/1114>
Fix horizontal position of last rtl line, with financial support from
Innovative Software
* _:#1146 <https://github.com/Kozea/WeasyPrint/pull/1146>
Fix bug with transparent borders in tables
* _:#1237 <https://github.com/Kozea/WeasyPrint/issues/1237>
Don’t gather bookmarks twice for blocks that are displayed on two pages
* _:#1025 <https://github.com/Kozea/WeasyPrint/issues/1025>
Use fallback fonts on unsupported WOFF2 and WOFF fonts
* _:#1027 <https://github.com/Kozea/WeasyPrint/issues/1027>
Don’t insert the same layout attributes multiple times
* _:#1050 <https://github.com/Kozea/WeasyPrint/issues/1050>
Don’t try to break tables after the header or before the footer
* _:#1204 <https://github.com/Kozea/WeasyPrint/issues/1204>
Don’t crash on absolute SVG files with no intrinsic size
* _:#1030 <https://github.com/Kozea/WeasyPrint/pull/1030>
Fix a crash with a flexbox corner case
* _:#1089 <https://github.com/Kozea/WeasyPrint/pull/1089>
Fix frozen builds
* _:#1216 <https://github.com/Kozea/WeasyPrint/pull/1213>
Fix Pyinstaller builds
* _:#1225 <https://github.com/Kozea/WeasyPrint/pull/1225>
Fix embedded files
* _:
Initial support of RTL direction in flexbox layout
Documentation:
* #1149 <https://github.com/Kozea/WeasyPrint/issues/1149>_:
Add the --quiet CLI option in the documentation#1061 <https://github.com/Kozea/WeasyPrint/pull/1061>
* _:
Update install instructions on Windows
Tests:
* #1209 <https://github.com/Kozea/WeasyPrint/pull/1209>_:
Use GitHub Actions instead of Travis
Contributors:
* Guillaume Ayoub
* Lucie Anglade
* Tontyna
* Mohammed Y. Alnajdi
* Mike Voets
* Bjarni Þórisson
* Balázs Dukai
* Bart Broere
* Endalkachew
* Felix Schwarz
* Julien Sanchez
* Konstantin Alekseev
* Nicolas Hart
* Nikolaus Schlemm
* Thomas J. Lampoltshammer
* mPyth
* nempoBu4
* saddy001
Backers and sponsors:
* Hashbang
* Innovative Software
* Screenbreak
* Simon Sapin
* Lisa Warshaw
* Nathalie Gutton
* Andreas Zettl
* Florian Demmer
* Moritz Mahringer
Version 51
----------
Released on 2019-12-23.
Dependencies:
* Pyphen 0.9.1+ is now needed
New features:
* #882 <https://github.com/Kozea/WeasyPrint/pull/882>_:
Add support of element() and running()#972 <https://github.com/Kozea/WeasyPrint/pull/972>
* _:7a4d6f8 <https://github.com/Kozea/WeasyPrint/commit/7a4d6f8>
Add HTML element to Box class
* _:
Support larger and smaller values for font-size
Bug fixes:
* #960 <https://github.com/Kozea/WeasyPrint/pull/960>_:#956 <https://github.com/Kozea/WeasyPrint/pull/956>
Fix how fonts used for macOS tests are installed
* _:#983 <https://github.com/Kozea/WeasyPrint/issues/983>
Fix various crashes due to line breaking bugs
* _:#975 <https://github.com/Kozea/WeasyPrint/pull/975>
Fix typo in variable name
* _:
Don’t crash when string-set is set to none#998 <https://github.com/Kozea/WeasyPrint/pull/998>
* _:#1005 <https://github.com/Kozea/WeasyPrint/issues/1005>
Keep font attributes when text lines are modified
* _:#974 <https://github.com/Kozea/WeasyPrint/pull/974>
Don’t let presentational hints add decorations on tables with no borders
* _:
Don’t crash on improper var() values#1012 <https://github.com/Kozea/WeasyPrint/pull/1012>
* _:#1013 <https://github.com/Kozea/WeasyPrint/issues/1013>
Fix rendering of header and footer for empty tables
* _:
Avoid quadratic time relative to tree depth when setting page names
Contributors:
- Lucie Anglade
- Guillaume Ayoub
- Guillermo Bonvehí
- Holger Brunn
- Felix Schwarz
- Tontyna
Version 50
----------
Released on 2019-09-19.
New features:
* #209 <https://github.com/Kozea/WeasyPrint/issues/209>_:
Make break-* properties work inside tables#661 <https://github.com/Kozea/WeasyPrint/issues/661>
* _:
Make blocks with overflow: auto grow to include floating children
Bug fixes:
* #945 <https://github.com/Kozea/WeasyPrint/issues/945>_:#727 <https://github.com/Kozea/WeasyPrint/issues/727>
Don't break pages between a list item and its marker
* _:#831 <https://github.com/Kozea/WeasyPrint/issues/831>
Avoid tables lost between pages
* _:#923 <https://github.com/Kozea/WeasyPrint/issues/923>
Ignore auto margins on flex containers
* _:#896 <https://github.com/Kozea/WeasyPrint/issues/896>
Fix a couple of crashes when splitting a line twice
* _:
Fix skip stack order when using a reverse flex direction
Contributors:
- Lucie Anglade
- Guillaume Ayoub
Version 49
----------
Released on 2019-09-11.
Performance:
* Speed and memory use have been largely improved.
New features:
* #700 <https://github.com/Kozea/WeasyPrint/issues/700>_:
Handle ::marker pseudo-selector135dc06c <https://github.com/Kozea/WeasyPrint/commit/135dc06c>
* _:
Handle recto and verso parameters for page breaks#907 <https://github.com/Kozea/WeasyPrint/pull/907>
* _:
Provide a clean way to build layout contexts
Bug fixes:
* #937 <https://github.com/Kozea/WeasyPrint/issues/937>_:#897 <https://github.com/Kozea/WeasyPrint/issues/897>
Fix rendering of tables with empty lines and rowspans
* _:#913 <https://github.com/Kozea/WeasyPrint/issues/913>
Don't crash when small columns are wrapped in absolute blocks
* _:#924 <https://github.com/Kozea/WeasyPrint/pull/924>
Fix a test about gradient colors
* _:#917 <https://github.com/Kozea/WeasyPrint/issues/917>
Fix title for document with attachments
* _:#919 <https://github.com/Kozea/WeasyPrint/issues/919>
Fix tests with Pango 1.44
* _:#901 <https://github.com/Kozea/WeasyPrint/issues/901>
Fix padding and margin management for column flex boxes
* _:#906 <https://github.com/Kozea/WeasyPrint/issues/906>
Fix width of replaced boxes with no intrinsic width
* _:#927 <https://github.com/Kozea/WeasyPrint/pull/927>
Don't respect table cell width when content doesn't fit
* _:
Don't use deprecated logger.warn anymorea8662794 <https://github.com/Kozea/WeasyPrint/commit/a8662794>
* _:87d9e84f <https://github.com/Kozea/WeasyPrint/commit/87d9e84f>
Fix margin collapsing between caption and table wrapper
* _:789b80e6 <https://github.com/Kozea/WeasyPrint/commit/789b80e6>
Avoid infinite loops when rendering columns
* _:615e298a <https://github.com/Kozea/WeasyPrint/commit/615e298a>
Only use in flow children to set columns height
* _:48d8632e <https://github.com/Kozea/WeasyPrint/commit/48d8632e>
Don't include floating elements each time we try to render a column
* _:e7c452ce <https://github.com/Kozea/WeasyPrint/commit/e7c452ce>
Avoid not in flow children to compute column height
* _:fb0887cf <https://github.com/Kozea/WeasyPrint/commit/fb0887cf>
Fix collapsing margins for columns
* _:f66df067 <https://github.com/Kozea/WeasyPrint/commit/f66df067>
Fix crash when using currentColor in gradients
* _:c790ff20 <https://github.com/Kozea/WeasyPrint/commit/c790ff20>
Don't crash when using ex units in word-spacing in letter-spacing
* _:d63eac31 <https://github.com/Kozea/WeasyPrint/commit/d63eac31>
Don't crash when properties needing base URL use var functions
* _:
Don't crash with object-fit: non images with no intrinsic size
Documentation:
* #900 <https://github.com/Kozea/WeasyPrint/issues/900>_:#692 <https://github.com/Kozea/WeasyPrint/issues/692>
Add documentation about semantic versioning
* _:#899 <https://github.com/Kozea/WeasyPrint/pull/899>
Add a snippet about PDF magnification
* _:#893 <https://github.com/Kozea/WeasyPrint/pull/893>
Add .NET wrapper link
* _:#902 <https://github.com/Kozea/WeasyPrint/pull/902>
Fixed wrong nested list comprehension example
* _:
Add state to the make_bookmark_tree documentation#921 <https://github.com/Kozea/WeasyPrint/pull/921>
* _:#328 <https://github.com/Kozea/WeasyPrint/issues/328>
Fix typos in the documentation
* _:
Add CSS sample for forms
Contributors:
- Lucie Anglade
- Guillaume Ayoub
- Raphael Gaschignard
- Stani
- Szmen
- Thomas Dexter
- Tontyna
Version 48
----------
Released on 2019-07-08.
Dependencies:
* CairoSVG 2.4.0+ is now needed
New features:
* #891 <https://github.com/Kozea/WeasyPrint/pull/891>_:
Handle text-overflow#878 <https://github.com/Kozea/WeasyPrint/pull/878>
* _:
Handle column-span#855 <https://github.com/Kozea/WeasyPrint/pull/855>
* _:
Handle all the text-decoration features#238 <https://github.com/Kozea/WeasyPrint/issues/238>
* _:#875 <https://github.com/Kozea/WeasyPrint/issues/875>
Don't repeat background images when it's not needed
* _:
Handle object-fit and object-position#870 <https://github.com/Kozea/WeasyPrint/issues/870>
* _:
Handle bookmark-state
Bug fixes:
* #686 <https://github.com/Kozea/WeasyPrint/issues/686>_:#885 <https://github.com/Kozea/WeasyPrint/issues/885>
Fix column balance when children are not inline
* _:#867 <https://github.com/Kozea/WeasyPrint/issues/867>
Actually use the content box to resolve flex items percentages
* _:#873 <https://github.com/Kozea/WeasyPrint/issues/873>
Fix rendering of KaTeX output, including (1) set row baseline of tables when
no cells are baseline-aligned, (2) set baseline for inline tables, (3) don't
align lines larger than their parents, (4) force CairoSVG to respect image
size defined by CSS.
* _:#811 <https://github.com/Kozea/WeasyPrint/issues/811>
Set a minimum height for empty list elements with outside marker
* _:#851 <https://github.com/Kozea/WeasyPrint/issues/851>
Don't use translations to align flex items
* _,#860 <https://github.com/Kozea/WeasyPrint/issues/860>
_:#862 <https://github.com/Kozea/WeasyPrint/issues/862>
Don't cut pages when content overflows a very little bit
* _:
Don't crash when using UTC dates in metadata
Documentation:
* #854 <https://github.com/Kozea/WeasyPrint/issues/854>_:
Add a "Tips & Tricks" section
Contributors:
- Gabriel Corona
- Guillaume Ayoub
- Manuel Barkhau
- Nathan de Maestri
- Lucie Anglade
- theopeek
Version 47
----------
Released on 2019-04-12.
New features:
* #843 <https://github.com/Kozea/WeasyPrint/pull/843>_:#846 <https://github.com/Kozea/WeasyPrint/pull/846>
Handle CSS variables
* _:
Handle :nth() page selector#847 <https://github.com/Kozea/WeasyPrint/pull/847>
* _:
Allow users to use a custom SSL context for HTTP requests
Bug fixes:
* #797 <https://github.com/Kozea/WeasyPrint/issues/797>_:#836 <https://github.com/Kozea/WeasyPrint/issues/836>
Fix underlined justified text
* _:#835 <https://github.com/Kozea/WeasyPrint/issues/835>
Fix crash when flex items are replaced boxes
* _:
Fix margin-break: auto
Version 46
----------
Released on 2019-03-20.
New features:
* #771 <https://github.com/Kozea/WeasyPrint/issues/771>_:
Handle box-decoration-break#115 <https://github.com/Kozea/WeasyPrint/issues/115>
* _:
Handle margin-break#821 <https://github.com/Kozea/WeasyPrint/issues/821>
* _:
Continuous integration includes tests on Windows
Bug fixes:
* #765 <https://github.com/Kozea/WeasyPrint/issues/765>_,#754 <https://github.com/Kozea/WeasyPrint/issues/754>
_,#800 <https://github.com/Kozea/WeasyPrint/issues/800>
_:#783 <https://github.com/Kozea/WeasyPrint/issues/783>
Fix many crashes related to the flex layout
* _:#827 <https://github.com/Kozea/WeasyPrint/pull/827>
Fix a couple of crashes with strange texts
* _:#823 <https://github.com/Kozea/WeasyPrint/pull/823>
Named strings and counters are case-sensitive
* _:#728 <https://github.com/Kozea/WeasyPrint/issues/728>
Shrink min/max-height/width according to box-sizing
* _,#171 <https://github.com/Kozea/WeasyPrint/issues/171>
_:#610 <https://github.com/Kozea/WeasyPrint/issues/610>
Don't crash when fixed boxes are nested
* _,#828 <https://github.com/Kozea/WeasyPrint/issues/828>
_:#808 <https://github.com/Kozea/WeasyPrint/issues/808>
Don't crash when preformatted text lines end with a space
* _,#387 <https://github.com/Kozea/WeasyPrint/issues/387>
_:#813 <https://github.com/Kozea/WeasyPrint/issues/813>
Fix position of some images
* _:
Don't crash when long preformatted text lines end with \n
Documentation:
* #815 <https://github.com/Kozea/WeasyPrint/pull/815>_:
Add documentation about custom url_fetcher
Version 45
----------
Released on 2019-02-20.
WeasyPrint now has a code of conduct
<https://github.com/Kozea/WeasyPrint/blob/master/CODE_OF_CONDUCT.rst>_.
A new website has been launched, with beautiful and useful graphs about speed
and memory use across versions: check WeasyPerf
<https://kozea.github.io/WeasyPerf/index.html>_.
Dependencies:
* Python 3.5+ is now needed, Python 3.4 is not supported anymore
Bug fixes:
* #798 <https://github.com/Kozea/WeasyPrint/pull/798>_:#767 <https://github.com/Kozea/WeasyPrint/issues/767>
Prevent endless loop and index out of range in pagination
* _:
Add a --quiet CLI parameter#784 <https://github.com/Kozea/WeasyPrint/pull/784>
* _:#791 <https://github.com/Kozea/WeasyPrint/pull/791>
Fix library loading on Alpine
* _:#789 <https://github.com/Kozea/WeasyPrint/pull/789>
Use path2url in tests for Windows
* _:#788 <https://github.com/Kozea/WeasyPrint/pull/788>
Add LICENSE file to distributed sources
* _:#780 <https://github.com/Kozea/WeasyPrint/issues/780>
Fix pending references
* _:#774 <https://github.com/Kozea/WeasyPrint/issues/774>
Don't draw patterns for empty page backgrounds
* _:#637 <https://github.com/Kozea/WeasyPrint/issues/637>
Don't crash when links include quotes
* _:#763 <https://github.com/Kozea/WeasyPrint/pull/763>
Fix a problem with justified text
* _:#704 <https://github.com/Kozea/WeasyPrint/issues/704>
Launch tests with Python 3.7
* _:#804 <https://github.com/Kozea/WeasyPrint/pull/804>
Fix a corner case with tables
* _:#109 <https://github.com/Kozea/WeasyPrint/issues/109>
Don't logger handlers defined before importing WeasyPrint
* _,#748 <https://github.com/Kozea/WeasyPrint/issues/748>
_:#770 <https://github.com/Kozea/WeasyPrint/issues/770>
Don't include punctuation for hyphenation
* _:separate logger
Don't crash when people use uppercase words from old-fashioned Microsoft
fonts in tables, especially when there's an 5th column
* Use a
<https://weasyprint.readthedocs.io/en/latest/tutorial.html#logging>_ to
report the rendering process
* Add a --debug CLI parameter and set debug level for unknown prefixed CSS
properties
* Define minimal versions of Python and setuptools in setup.cfg
Documentation:
* #796 <https://github.com/Kozea/WeasyPrint/pull/796>_:#792 <https://github.com/Kozea/WeasyPrint/pull/792>
Fix a small typo in the tutorial
* _:#773 <https://github.com/Kozea/WeasyPrint/pull/773>
Document no alignment character support
* _:#402 <https://github.com/Kozea/WeasyPrint/issues/402>
Fix phrasing in Hacking section
* _:#764 <https://github.com/Kozea/WeasyPrint/pull/764>
Add a paragraph about fontconfig error
* _:
Fix list of dependencies for Alpine
* Fix API documentation of HTML and CSS classes
Version 44
----------
Released on 2018-12-29.
Bug fixes:
* #742 <https://github.com/Kozea/WeasyPrint/issues/742>_:#746 <https://github.com/Kozea/WeasyPrint/issues/746>
Don't crash during PDF generation when locale uses commas as decimal separator
* _:
Close file when reading VERSION
* Improve speed and memory usage for long texts.
Documentation:
* #733 <https://github.com/Kozea/WeasyPrint/pull/733>_:#735 <https://github.com/Kozea/WeasyPrint/pull/735>
Small documentation fixes
* _:
Fix broken links in NEWS.rst
Version 43
----------
Released on 2018-11-09.
Bug fixes:
* #726 <https://github.com/Kozea/WeasyPrint/issues/726>_:#729 <https://github.com/Kozea/WeasyPrint/issues/729>
Make empty strings clear previous values of named strings
* _:
Include tools in packaging
This version also includes the changes from unstable rc1 and rc2 versions
listed below.
Version 43rc2
-------------
Released on 2018-11-02.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Bug fixes:
* #706 <https://github.com/Kozea/WeasyPrint/issues/706>_:#687 <https://github.com/Kozea/WeasyPrint/issues/687>
Fix text-indent at the beginning of a page
* _:#720 <https://github.com/Kozea/WeasyPrint/issues/720>
Allow query strings in file:// URIs
* _:#717 <https://github.com/Kozea/WeasyPrint/issues/717>
Optimize minimum size calculation of long inline elements
* _:#691 <https://github.com/Kozea/WeasyPrint/issues/691>
Display <details> tags as blocks
* _:#722 <https://github.com/Kozea/WeasyPrint/issues/722>
Don't recalculate max content widths when distributing extra space for tables
* _:#723 <https://github.com/Kozea/WeasyPrint/issues/723>
Fix bookmarks and strings set on images
* _:
Warn users when string() is not used in page margin
Version 43rc1
-------------
Released on 2018-10-15.
This version is experimental, don't use it in production. If you find bugs,
please report them!
Dependencies:
* Python 3.4+ is now needed, Python 2.x is not supported anymore
* Cairo 1.15.4+ is now needed, but 1.10+ should work with missing features
(such as links, outlines and metadata)
* Pdfrw is not needed anymore
New features:
* Beautiful website <https://weasyprint.org>_#579 <https://github.com/Kozea/WeasyPrint/issues/579>
* _:#592 <https://github.com/Kozea/WeasyPrint/pull/592>
Initial support of flexbox
* _:#306 <https://github.com/Kozea/WeasyPrint/issues/306>
Support @font-face on Windows
* _:#594 <https://github.com/Kozea/WeasyPrint/pull/594>
Add a timeout parameter to the URL fetcher functions
* _:#599 <https://github.com/Kozea/WeasyPrint/pull/599>
Split tests using modern pytest features
* _:#604 <https://github.com/Kozea/WeasyPrint/pull/604>
Make tests pass on Windows
* _:#631 <https://github.com/Kozea/WeasyPrint/pull/631>
Handle target counters and target texts
* _:#622 <https://github.com/Kozea/WeasyPrint/issues/622>
Enable counter-increment and counter-reset in page context
* _:#674 <https://github.com/Kozea/WeasyPrint/issues/674>
Allow pathlib.Path objects for HTML, CSS and Attachment classes
* _:
Add extensive installation instructions for Windows
Bug fixes:
* #558 <https://github.com/Kozea/WeasyPrint/issues/558>_:#565 <https://github.com/Kozea/WeasyPrint/issues/565>
Fix attachments
* _,#596 <https://github.com/Kozea/WeasyPrint/issues/596>
_,#539 <https://github.com/Kozea/WeasyPrint/issues/539>
_:#614 <https://github.com/Kozea/WeasyPrint/issues/614>
Fix many PDF rendering, printing and compatibility problems
* _:#662 <https://github.com/Kozea/WeasyPrint/pull/662>
Avoid crashes and endless loops caused by a Pango bug
* _:#666 <https://github.com/Kozea/WeasyPrint/issues/666>
Fix warnings and errors when generating documentation
* _,#685 <https://github.com/Kozea/WeasyPrint/issues/685>
_:#680 <https://github.com/Kozea/WeasyPrint/pull/680>
Fix many table layout rendering problems
* _:#662 <https://github.com/Kozea/WeasyPrint/pull/662>
Don't crash when there's no font available
* _:
Fix support of some align values in tables
Version 0.42.3
--------------
Released on 2018-03-27.
Bug fixes:
* #583 <https://github.com/Kozea/WeasyPrint/issues/583>_:#586 <https://github.com/Kozea/WeasyPrint/issues/586>
Fix floating-point number error to fix floating box layout
* _:#582 <https://github.com/Kozea/WeasyPrint/issues/582>
Don't optimize resume_at when splitting lines with trailing spaces
* _:#580 <https://github.com/Kozea/WeasyPrint/issues/580>
Fix table layout with no overflow
* _:#576 <https://github.com/Kozea/WeasyPrint/issues/576>
Fix inline box breaking function
* _:#574 <https://github.com/Kozea/WeasyPrint/issues/574>
Split replaced_min_content_width and replaced_max_content_width
* _:#569 <https://github.com/Kozea/WeasyPrint/issues/569>
Respect text direction and don't translate rtl columns twice
* _:
Get only first line's width of inline children to get linebox width
Version 0.42.2
--------------
Released on 2018-02-04.
Bug fixes:
* #560 <https://github.com/Kozea/WeasyPrint/issues/560>_:
Fix a couple of crashes and endless loops when breaking lines.
Version 0.42.1
--------------
Released on 2018-02-01.
Bug fixes:
* #566 <https://github.com/Kozea/WeasyPrint/issues/566>_:#567 <https://github.com/Kozea/WeasyPrint/issues/567>
Don't crash when using @font-config.
* _:#465 <https://github.com/Kozea/WeasyPrint/issues/465>
Fix text-indent with text-align: justify.
* _:#562 <https://github.com/Kozea/WeasyPrint/issues/562>
Fix string(\*, start).
* _:#507 <https://github.com/Kozea/WeasyPrint/issues/507>
Handle named pages with pseudo-class.
* _:#557 <https://github.com/Kozea/WeasyPrint/issues/557>
Fix running headers.
* _:#555 <https://github.com/Kozea/WeasyPrint/issues/555>
Avoid infinite loops in inline_line_width.
* _:
Fix margins, borders and padding in column layouts.
Version 0.42
------------
Released on 2017-12-26.
WeasyPrint is not tested with (end-of-life) Python 3.3 anymore.
This release is probably the last version of the 0.x series.
Next version may include big changes:
- end of Python 2.7 support,
- initial support of bidirectional text,
- initial support of flexbox,
- improvements for speed and memory usage.
New features:
* #532 <https://github.com/Kozea/WeasyPrint/issues/532>_:
Support relative file URIs when using CLI.
Bug fixes:
* #553 <https://github.com/Kozea/WeasyPrint/issues/553>_:#409 <https://github.com/Kozea/WeasyPrint/issues/409>
Fix slow performance for pre-formatted boxes with a lot of children.
* _:#39 <https://github.com/Kozea/WeasyPrint/issues/39>
Don't crash when rendering some tables.
* _:#301 <https://github.com/Kozea/WeasyPrint/issues/301>
Fix rendering of floats in inlines.
* _:#530 <https://github.com/Kozea/WeasyPrint/issues/530>
Split lines carefully.
* _:#534 <https://github.com/Kozea/WeasyPrint/issues/534>
Fix root when frozen with Pyinstaller.
* _:#360 <https://github.com/Kozea/WeasyPrint/issues/360>
Handle SVGs containing images embedded as data URIs.
* _:#525 <https://github.com/Kozea/WeasyPrint/issues/525>
Fix border-radius rendering problem with some PDF readers.
* _:#227 <https://github.com/Kozea/WeasyPrint/issues/227>
Fix pipenv support.
* _:#520 <https://github.com/Kozea/WeasyPrint/issues/520>
Smartly handle replaced boxes with percentage width in auto-width parents.
* _:
Don't ignore CSS @page rules that are imported by an @import rule.
Version 0.41
------------
Released on 2017-10-05.
WeasyPrint now depends on pdfrw >= 0.4.
New features:
* #471 <https://github.com/Kozea/WeasyPrint/issues/471>_:
Support page marks and bleed.
Bug fixes:
* #513 <https://github.com/Kozea/WeasyPrint/issues/513>_:#506 <https://github.com/Kozea/WeasyPrint/issues/506>
Don't crash on unsupported image-resolution values.
* _:#500 <https://github.com/Kozea/WeasyPrint/pull/500>
Fix @font-face use with write_* methods.
* _:#498 <https://github.com/Kozea/WeasyPrint/issues/498>
Improve readability of _select_source function.
* _:#441 <https://github.com/Kozea/WeasyPrint/issues/441>
Use CSS prefixes as recommended by the CSSWG.
* _:bb3a4db <https://github.com/Kozea/WeasyPrint/commit/bb3a4db>
Fix rendering problems and crashes when using @font-face.
* _:1d1654c <https://github.com/Kozea/WeasyPrint/commit/1d1654c>
Try to break pages after a block before trying to break inside it.
* _:
Fix and test corner cases about named pages.
Documentation:
* #508 <https://github.com/Kozea/WeasyPrint/pull/508>_:a7b17fb <https://github.com/Kozea/WeasyPrint/commit/a7b17fb>
Add missing libpangocairo dependency for Debian and Ubuntu.
* _:
Add documentation on logged rendering steps.
Version 0.40
------------
Released on 2017-08-17.
WeasyPrint now depends on cssselect2 instead of cssselect and lxml.
New features:
* #57 <https://github.com/Kozea/WeasyPrint/issues/57>_:#498 <https://github.com/Kozea/WeasyPrint/issues/498>
Named pages.
* Unprefix properties, see
_.
* Add a "verbose" option logging the document generation steps.
Bug fixes:
* #483 <https://github.com/Kozea/WeasyPrint/issues/483>_:#70 <https://github.com/Kozea/WeasyPrint/issues/70>
Fix slow performance with long pre-formatted texts.
* _:#487 <https://github.com/Kozea/WeasyPrint/issues/487>
Improve speed and memory usage for long documents.
* _:
Don't crash on local() fonts with a space and no quotes.
Version 0.39
------------
Released on 2017-06-24.
Bug fixes:
* Fix the use of WeasyPrint's URL fetcher with CairoSVG.
Version 0.38
------------
Released on 2017-06-16.
Bug fixes:
* #477 <https://github.com/Kozea/WeasyPrint/issues/477>_:
Don't crash on font-face's src attributes with local functions.
Version 0.37
------------
Released on 2017-06-15.
WeasyPrint now depends on tinycss2 instead of tinycss.
New features:
* #437 <https://github.com/Kozea/WeasyPrint/issues/437>_:
Support local links in generated PDFs.
Bug fixes:
* #412 <https://github.com/Kozea/WeasyPrint/issues/412>_:#417 <https://github.com/Kozea/WeasyPrint/issues/417>
Use a NullHandler log handler when WeasyPrint is used as a library.
* _,#472 <https://github.com/Kozea/WeasyPrint/issues/472>
_:#327 <https://github.com/Kozea/WeasyPrint/issues/327>
Don't crash on some line breaks.
* _:#467 <https://github.com/Kozea/WeasyPrint/issues/467>
Don't crash with replaced elements with height set in percentages.
* _:#446 <https://github.com/Kozea/WeasyPrint/pull/446>
Remove incorrect line breaks.
* _:
Let the logging module do the string interpolation.
Version 0.36
------------
Released on 2017-02-25.
New features:
* #407 <https://github.com/Kozea/WeasyPrint/pull/407>_:#423 <https://github.com/Kozea/WeasyPrint/pull/423>
Handle ::first-letter.
* _:
Warn user about broken cairo versions.
Bug fixes:
* #411 <https://github.com/Kozea/WeasyPrint/pull/411>_:
Typos fixed in command-line help.
Version 0.35
------------
Released on 2017-02-25.
Bug fixes:
* #410 <https://github.com/Kozea/WeasyPrint/pull/410>_:
Fix AssertionError in split_text_box.
Version 0.34
------------
Released on 2016-12-21.
Bug fixes:
* #398 <https://github.com/Kozea/WeasyPrint/issues/398>_:#399 <https://github.com/Kozea/WeasyPrint/pull/399>
Honor the presentational_hints option for PDFs.
* _:#396 <https://github.com/Kozea/WeasyPrint/issues/396>
Avoid CairoSVG-2.0.0rc* on Python 2.
* _:#403 <https://github.com/Kozea/WeasyPrint/issues/403>
Correctly close files open by mkstemp.
* _:
Cast the number of columns into int.
* Fix multi-page multi-columns and add related tests.
Version 0.33
------------
Released on 2016-11-28.
New features:
* #393 <https://github.com/Kozea/WeasyPrint/issues/393>_:#370 <https://github.com/Kozea/WeasyPrint/issues/370>
Add tests on MacOS.
* _:
Enable @font-face on MacOS.
Bug fixes:
* #389 <https://github.com/Kozea/WeasyPrint/issues/389>_:#394 <https://github.com/Kozea/WeasyPrint/issues/394>
Always update resume_at when splitting lines.
* _:#388 <https://github.com/Kozea/WeasyPrint/issues/388>
Don't build universal wheels.
* _:
Fix logic when finishing block formatting context.
Version 0.32
------------
Released on 2016-11-17.
New features:
* #28 <https://github.com/Kozea/WeasyPrint/issues/28>_:#253 <https://github.com/Kozea/WeasyPrint/issues/253>
Support @font-face on Linux.
* Support CSS fonts level 3 almost entirely, including OpenType features.
* _:#384 <https://github.com/Kozea/WeasyPrint/issues/384>
Support presentational hints (optional).
* Support break-after, break-before and break-inside for pages and columns.
* _:
Major performance boost.
Bux fixes:
* #368 <https://github.com/Kozea/WeasyPrint/issues/368>_:#382 <https://github.com/Kozea/WeasyPrint/issues/382>
Respect white-space for shrink-to-fit.
* _:
Fix the preferred width for column groups.
* Handle relative boxes in column-layout boxes.
Documentation:
* Add more and more documentation about Windows installation.
* #355 <https://github.com/Kozea/WeasyPrint/issues/355>_:
Add fonts requirements for tests.
Version 0.31
------------
Released on 2016-08-28.
New features:
* #124 <https://github.com/Kozea/WeasyPrint/issues/124>_:#60 <https://github.com/Kozea/WeasyPrint/issues/60>
Add MIME sniffing for images.
* _:#197 <https://github.com/Kozea/WeasyPrint/pull/197>
CSS Multi-column Layout.
* _:
Add hyphens at line breaks activated by a soft hyphen.
Bux fixes:
* #132 <https://github.com/Kozea/WeasyPrint/pull/132>_:
Fix Python 3 compatibility on Windows.
Documentation:
* #329 <https://github.com/Kozea/WeasyPrint/issues/329>_:
Add documentation about installation on Windows.
Version 0.30
------------
Released on 2016-07-18.
WeasyPrint now depends on html5lib-0.999999999.
Bux fixes:
* Fix Acid2
* #325 <https://github.com/Kozea/WeasyPrint/issues/325>_:#334 <https://github.com/Kozea/WeasyPrint/issues/334>
Cutting lines is broken in page margin boxes.
* _:
Newest html5lib 0.999999999 breaks rendering.
Version 0.29
------------
Released on 2016-06-17.
Bug fixes:
* #263 <https://github.com/Kozea/WeasyPrint/pull/263>_:#323 <https://github.com/Kozea/WeasyPrint/pull/323>
Don't crash with floats with percents in positions.
* _:
Fix CairoSVG 2.0 pre-release dependency in Python 2.x.
Version 0.28
------------
Released on 2016-05-16.
Bug fixes:
* #189 <https://github.com/Kozea/WeasyPrint/issues/189>_:
white-space: nowrap still wraps on hyphens#305 <https://github.com/Kozea/WeasyPrint/issues/305>
* _:
Fix crashes on some tables
* Don't crash when transform matrix isn't invertible
* Don't crash when rendering ratio-only SVG images
* Fix margins and borders on some tables
Version 0.27
------------
Released on 2016-04-08.
New features:
* #295 <https://github.com/Kozea/WeasyPrint/pull/295>_:#299 <https://github.com/Kozea/WeasyPrint/pull/299>
Support the 'rem' unit.
* _:
Enhance the support of SVG images.
Bug fixes:
* #307 <https://github.com/Kozea/WeasyPrint/issues/307>_:
Fix the layout of cells larger than their tables.
Documentation:
* The website is now on GitHub Pages, the documentation is on Read the Docs.
* #297 <https://github.com/Kozea/WeasyPrint/issues/297>_:
Rewrite the CSS chapter of the documentation.
Version 0.26
------------
Released on 2016-01-29.
New features:
* Support the empty-cells attribute.
* Respect table, column and cell widths.
Bug fixes:
* #172 <https://github.com/Kozea/WeasyPrint/issues/172>_:#151 <https://github.com/Kozea/WeasyPrint/issues/151>
Unable to set table column width on tables td's.
* _:#260 <https://github.com/Kozea/WeasyPrint/issues/260>
Table background colour bleeds beyond table cell boundaries.
* _:#288 <https://github.com/Kozea/WeasyPrint/issues/288>
TypeError: unsupported operand type(s) for +: 'float' and 'str'.
* _:#286 <https://github.com/Kozea/WeasyPrint/issues/286>
Unwanted line-breaks in bold text.
* _:
AttributeError: 'Namespace' object has no attribute 'attachments'.
Version 0.25
------------
Released on 2015-12-17.
New features:
* Support the 'q' unit.
Bug fixes:
* #285 <https://github.com/Kozea/WeasyPrint/issues/285>_:#284 <https://github.com/Kozea/WeasyPrint/issues/284>
Fix a crash happening when splitting lines.
* _:#280 <https://github.com/Kozea/WeasyPrint/pull/280>
Escape parenthesis in PDF links.
* _:#269 <https://github.com/Kozea/WeasyPrint/pull/269>
Replace utf8 with utf-8 for gettext/django compatibility.
* _:#250 <https://github.com/Kozea/WeasyPrint/issues/250>
Add support for use when frozen.
* _:
Don't crash when attachments are not available.
Version 0.24
------------
Released on 2015-08-04.
New features:
* #174 <https://github.com/Kozea/WeasyPrint/issues/174>_:
Basic support for Named strings.
Bug fixes:
* #207 <https://github.com/Kozea/WeasyPrint/issues/207>_:#224 <https://github.com/Kozea/WeasyPrint/pull/224>
Draw rounded corners on replaced boxes.
* _:#31 <https://github.com/Kozea/WeasyPrint/issues/31>
Rely on the font size for rounding bug workaround.
* _:#202 <https://github.com/Kozea/WeasyPrint/issues/202>
Honor the vertical-align property in fixed-height cells.
* _:#225 <https://github.com/Kozea/WeasyPrint/issues/225>
Remove unreachable area/border at bottom of page.
* _:
Don't allow unknown units during line-height validation.
* Fix some wrong conflict resolutions for table borders with inset
and outset styles.
Version 0.23
------------
Released on 2014-09-16.
Bug fixes:
* #196 <https://github.com/Kozea/WeasyPrint/issues/196>_:#194 <https://github.com/Kozea/WeasyPrint/pull/194>
Use the default image sizing algorithm for images’s preferred size.
* _:
Try more library aliases with dlopen().#201 <https://github.com/Kozea/WeasyPrint/pull/201>
* _:
Consider page-break-after-avoid when pushing floats to the next page.#217 <https://github.com/Kozea/WeasyPrint/issues/217>
* _:
Avoid a crash on zero-sized background images.
Release process:
* Start testing on Python 3.4 on Travis-CI.
Version 0.22
------------
Released on 2014-05-05.
New features:
* #86 <https://github.com/Kozea/WeasyPrint/pull/86>_:#177 <https://github.com/Kozea/WeasyPrint/pull/177>
Support gzip and deflate encoding in HTTP responses
* _:
Support for PDF attachments.
Bug fixes:
* #169 <https://github.com/Kozea/WeasyPrint/issues/169>_:#168 <https://github.com/Kozea/WeasyPrint/issues/168>
Fix a crash on percentage-width columns in an auto-width table.
* _:
Make <fieldset> a block in the user-agent stylesheet.#175 <https://github.com/Kozea/WeasyPrint/issues/175>
* _:
Fix some dlopen() library loading issues on OS X.#183 <https://github.com/Kozea/WeasyPrint/issues/183>
* _:#188 <https://github.com/Kozea/WeasyPrint/issues/188>
Break to the next page before a float that would overflow the page.
(It might still overflow if it’s bigger than the page.)
* _:
Require a recent enough version of Pyphen
Release process:
* Drop Python 3.1 support.
* Set up Travis CI
to automatically test all pushes and pull requests.
* Start testing on Python 3.4 locally. (Travis does not support 3.4 yet.)
Version 0.21
------------
Released on 2014-01-11.
New features:
* Add the overflow-wrap <https://drafts.csswg.org/css-text/#overflow-wrap>_image-resolution
property, allowing line breaks inside otherwise-unbreakable words.
Thanks Frédérick Deslandes!
* Add the
<https://drafts.csswg.org/css-images-3/#the-image-resolution>_ property,
allowing images to be sized proportionally to their intrinsic size
at a resolution other than 96 image pixels per CSS in
(ie. one image pixel per CSS px)
Bug fixes:
* #145 <https://github.com/Kozea/WeasyPrint/issues/145>_:#40 <https://github.com/Kozea/WeasyPrint/issues/40>
Fix parsing HTML from an HTTP URL on Python 3.x
* _:
Use more general hyphenation dictionaries for specific document languages.
(E.g. use hyph_fr.dic for lang="fr_FR".)#26 <https://github.com/Kozea/WeasyPrint/issues/26>
* _:
Fix min-width and max-width on floats.#100 <https://github.com/Kozea/WeasyPrint/issues/100>
* _:
Fix a crash on trailing whitespace with font-size: 0#82 <https://github.com/Kozea/WeasyPrint/issues/82>
* _:
Borders on tables with border-collapse: collapse were sometimes#30 <https://github.com/Kozea/WeasyPrint/issues/30>
drawn at an incorrect position.
* _:
Fix positioning of images with position: absolute.#118 <https://github.com/Kozea/WeasyPrint/issues/118>
* _:
Fix a crash when using position: absolute
inside a position: relative element.
* Fix visibility: collapse to behave like visibility: hidden#147 <https://github.com/Kozea/WeasyPrint/issues/147>
on elements other than table rows and table columns.
* _ and#153 <https://github.com/Kozea/WeasyPrint/issues/153>
_:#152 <https://github.com/Kozea/WeasyPrint/issues/152>
Fix dependencies to require lxml 3.0 or a more recent version.
Thanks gizmonerd and Thomas Grainger!
* _:
Fix a crash on percentage-sized table cells in auto-sized tables.
Thanks Johannes Duschl!
Version 0.20.2
--------------
Released on 2013-12-18.
* Fix #146 <https://github.com/Kozea/WeasyPrint/issues/146>_: don't crash
when drawing really small boxes with dotted/dashed borders
Version 0.20.1
--------------
Released on 2013-12-16.
* Depend on html5lib >= 0.99 instead of 1.0b3 to fix pip 1.4 support.
* Fix #74 <https://github.com/Kozea/WeasyPrint/issues/74>_: don't crash on#78 <https://github.com/Kozea/WeasyPrint/issues/78>
space followed by dot at line break.
* Fix _: nicer colors for
border-style: ridge/groove/inset/outset.
Version 0.20
------------
Released on 2013-12-14.
* Add support for border-radius.#77 <https://github.com/Kozea/WeasyPrint/issues/77>
* Feature _: Add PDF#12 <https://github.com/Kozea/WeasyPrint/pull/12>
metadata from HTML.
* Feature _: Use html5lib.
* Tables: handle percentages for column groups, columns and cells, and values
for row height.
* Bug fixes:
* Fix #84 <https://github.com/Kozea/WeasyPrint/pull/84>_: don't crash when#101 <https://github.com/Kozea/WeasyPrint/issues/101>
stylesheets are not available.
* Fix _: use page ids
instead of page numbers in PDF bookmarks.
* Use logger.warning instead of deprecated logger.warn.
* Add 'font-stretch' in the 'font' shorthand.
Version 0.19.2
--------------
Released on 2013-06-18.
Bug fix release:
* Fix #88 <https://github.com/Kozea/WeasyPrint/issues/88>_:
text-decoration: overline not being drawn above the text
* Bug fix: Actually draw multiple lines when multiple values are given
to text-decoration.
* Use the font metrics for text decoration positioning.
* Bug fix: Don't clip the border with overflow: hidden.#99 <https://github.com/Kozea/WeasyPrint/issues/99>
* Fix _:
Regression: JPEG images not loading with cairo 1.8.x.
Version 0.19.1
--------------
Released on 2013-04-30.
Bug fix release:
* Fix incorrect intrinsic width calculation
leading to unnecessary line breaks in floats, tables, etc.
* Tweak border painting to look better
* Fix unnecessary page break before big tables.
* Fix table row overflowing at the bottom of the page
when there are margins above the table.
* Fix position: fixed to actually repeat on every page.#76 <https://github.com/Kozea/WeasyPrint/issues/76>
* Fix _:
repeat <thead> and <tfoot> elements on every page,
even with table border collapsing.
Version 0.19
------------
Released on 2013-04-18.
* Add support for linear-gradient() and radial-gradient
in background images.
* Add support for the ex and ch length units.
(1ex is based on the font instead of being always 0.5em as before.)
* Add experimental support for Level 4 hyphenation properties.
* Drop support for CFFI < 0.6 and cairocffi < 0.4.
* Many bug fixes, including:
* Fix #54 <https://github.com/Kozea/WeasyPrint/issues/54>_:#71 <https://github.com/Kozea/WeasyPrint/issues/71>
min/max-width/height on block-level images.
* Fix _:
Crash when parsing nested functional notation.
Version 0.18
------------
Released on 2013-03-30.
* Add support for Level 3 backgrounds,
including multiple background layers per element/box.
* Forward-compatibility with (future releases of) cairocffi 0.4+ and CFFI 0.6+.
* Bug fixes:
* Avoid some unnecessary line breaks
for elements sized based on their content (aka. “shrink-to-fit”)
such as floats and page headers.
* Allow page breaks between empty blocks.
* Fix #66 <https://github.com/Kozea/WeasyPrint/issues/66>_:#21 <https://github.com/Kozea/WeasyPrint/issues/21>
Resolve images’ auto width from non-auto height and intrinsic ratio.
* Fix _:
The data: URL scheme is case-insensitive.#53 <https://github.com/Kozea/WeasyPrint/issues/53>
* Fix _:
Crash when backtracking for break-before/after: avoid.
Version 0.17.1
--------------
Released on 2013-03-18.
Bug fixes:
* Fix #41 <https://github.com/Kozea/WeasyPrint/issues/41>_:#42 <https://github.com/Kozea/WeasyPrint/issues/42>
GObject initialization when GDK-PixBuf is not installed.
* Fix _:#49 <https://github.com/Kozea/WeasyPrint/issues/49>
absolute URLs without a base URL (ie. document parsed from a string.)
* Fix some whitespace collapsing bugs.
* Fix absolutely-positioned elements inside inline elements.
* Fix URL escaping of image references from CSS.
* Fix _:#44 <https://github.com/Kozea/WeasyPrint/issues/44>
Division by 0 on dashed or dotted border smaller than one dot/dash.
* Fix _:
bad interaction of page-break-before/after: avoid and floats.
Version 0.17
------------
Released on 2013-02-27.
* Added text hyphenation_ with the -weasy-hyphens property.
* When a document includes JPEG images, embed them as JPEG in the PDF output.
This often results in smaller PDF file size
compared to the default deflate compression.
* Switched to using CFFI instead of PyGTK or PyGObject-introspection.
* Layout bug fixes:
- Correctly trim whitespace at the end of lines.
- Fix some cases with floats within inline content.
.. _text hyphenation: https://weasyprint.readthedocs.io/en/latest/features.html#css-text-module-level-3-4
Version 0.16
------------
Released on 2012-12-13.
* Add the zoom parameter to HTML.write_pdf and
Document.write_pdf() <weasyprint.document.Document.write_pdf>
* Fix compatibility with old (and buggy) pycairo versions.
WeasyPrint is now tested on 1.8.8 in addition to the latest.
* Fix layout bugs related to line trailing spaces.
Version 0.15
------------
Released on 2012-10-09.
* Add a low-level API that enables painting pages individually on any
cairo surface.
* Backward-incompatible change: remove the HTML.get_png_pages
method. The new low-level API covers this functionality and more.
* Add support for the font-stretch property.
* Add support for @page:blank to select blank pages.
* New Sphinx-based and improved docs
* Bug fixes:
- Importing Pango in some PyGTK installations.
- Layout of inline-blocks with vertical-align: top or bottom.
- Do not repeat a block’s margin-top or padding-top after a page break.
- Performance problem with large tables split across many pages.
- Anchors and hyperlinks areas now follow CSS transforms.
Since PDF links have to be axis-aligned rectangles, the bounding box
is used. This may be larger than expected with rotations that are
not a multiple of 90 degrees.
Version 0.14
------------
Released on 2012-08-03.
* Add a public API to choose media type used for @media.
(It still defaults to print). Thanks Chung Lu!
* Add --base-url and --resolution to the command-line API, making it
as complete as the Python one.
* Add support for the <base href="..."> element in HTML.
* Add support for CSS outlines
* Switch to gdk-pixbuf instead of Pystacia for loading raster images.
* Bug fixes:
- Handling of filenames and URLs on Windows
- Unicode filenames with older version of py2cairo
- base_url now behaves as expected when set to a directory name.
- Make some tests more robust
Version 0.13
------------
Released on 2012-07-23.
* Add support for PyGTK, as an alternative to PyGObject + introspection.
This should make WeasyPrint easier to run on platforms that not not have
packages for PyGObject 3.x yet.
* Bug fix: crash in PDF outlines for some malformed HTML documents
Version 0.12
------------
Released on 2012-07-19.
* Add support for collapsed borders on tables. This is currently incompatible
with repeating header and footer row groups on each page: headers and footers
are treated as normal row groups on table with border-collapse: collapse.
* Add url_fetcher to the public API. This enables users to hook intoFlask-WeasyPrint
WeasyPrint for fetching linked stylesheets or images, eg. to generate them
on the fly without going through the network.
This enables the creation of
<https://packages.python.org/Flask-WeasyPrint/>_.
Version 0.11
------------
Released on 2012-07-04.
* Add support for floats and clear.
Together with various bug fixes, this enables WeasyPrint to pass the Acid2
test! Acid2 is now part of our automated test suite.
* Add support for the width, min-width, max-width, height, min-height and
max-height properties in @page. The size property is now the size of the
page’s containing block.
* Switch the Variable Dimension rules to the new proposal
<https://github.com/SimonSapin/css/blob/master/margin-boxes-variable-dimension>_.
The previous implementation was broken in many cases.
* The image-rendering, transform, transform-origin and size
properties are now unprefixed. The prefixed form (eg. -weasy-size) is ignored
but gives a specific warning.
Version 0.10
------------
Released on 2012-06-25.
* Add get_png_pages() to the public API. It returns each page as
a separate PNG image.
* Add a resolution parameter for PNG.
Add WeasyPrint Navigator*, a web application that shows WeasyPrint’s
output with clickable links. Yes, that’s a browser in your browser.
Start it with python -m weasyprint.navigatorvertical-align: top
* Add support for and vertical-align: bottompage-break-before: avoid
* Add support for and page-break-after: avoid
* Bug fixes
Version 0.9
-----------
Released on 2012-06-04.
* Relative, absolute and fixed positioning
* Proper painting order (z-index)
* In PDF: support for internal and external hyperlinks as well as bookmarks.
* Added the tree parameter to the HTML class: accepts a parsed lxml
object.
* Bug fixes, including many crashes.
Bookmarks can be controlled by the -weasy-bookmark-level and-weasy-bookmark-label properties, as described in CSS Generated Content
for Paged Media Module <https://drafts.csswg.org/css-gcpm-3/#bookmarks>_.
The default UA stylesheet sets a matching bookmark level on all <h1>
to <h6> elements.
Version 0.8
-----------
Released on 2012-05-07.
* Switch from cssutils to tinycss_ as the CSS parser.
* Switch to the new cssselect_, almost all level 3 selectors are supported now.
* Support for inline blocks and inline tables
* Automatic table layout (column widths)
* Support for the min-width, max-width, min-height and
max-height properties, except on table-related and page-related boxes.
* Speed improvements on big stylesheets / small documents thanks to tinycss.
* Many bug fixes
.. _tinycss: https://packages.python.org/tinycss/
.. _cssselect: https://packages.python.org/cssselect/
Version 0.7.1
-------------
Released on 2012-03-21.
Change the license from AGPL to BSD.
Version 0.7
-----------
Released on 2012-03-21.
* Support page breaks between table rows
* Support for the orphans and widows properties.
* Support for page-break-inside: avoid
* Bug fixes
Only avoiding page breaks before/after an element is still missing.
Version 0.6.1
-------------
Released on 2012-03-01.
Fix a packaging bug. (Remove use_2to3 in setup.py. We use the same
codebase for Python 2 and 3.)
Version 0.6
-----------
Released on 2012-02-29.
Backward incompatible*: completely change the Python API. See the
documentation:
https://weasyprint.readthedocs.io/en/latest/tutorial.html#as-a-python-library
Backward incompatible*: Proper margin collapsing.
This changes how blocks are rendered: adjoining margins "collapse"
(their maximum is used) instead of accumulating.
* Support images in embed or object elements.
* Switch to pystacia instead of PIL for raster images
* Add compatibility with CPython 2.6 and 3.2. (Previously only 2.7
was supported)
* Many bug fixes
Version 0.5
-----------
Released on 2012-02-08.
* Support for the overflow and clip properties.
* Support for the opacity property from CSS3 Colors.
* Support for CSS 2D Transforms. These are prefixed, so you need to use
-weasy-transform and -weasy-transform-origin.
Version 0.4
-----------
Released on 2012-02-07.
* Support text-align: justify, word-spacing and letter-spacing.
* Partial support for CSS3 Paged Media: page size and margin boxes with
page-based counters.
* All CSS 2.1 border styles
* Fix SVG images with non-pixel units. Requires CairoSVG 0.3
* Support for page-break-before and page-break-after, except for
the value avoid.
* Support for the background-clip, background-origin and
background-size from CSS3 (but still with a single background
per element)
* Support for the image-rendering from SVG. This one is prefixed,
use -weasy-image-rendering. It only has an effect on PNG output.
Version 0.3.1
-------------
Released on 2011-12-14.
Compatibility with CairoSVG 0.1.2
Version 0.3
-----------
Released on 2011-12-13.
* Backward-incompatible change: the 'size' property is now prefixed (since
it is in an experimental specification). Use '-weasy-size' instead.
* cssutils 0.9.8 or higher is now required.
* Support SVG images with CairoSVG
* Support generated content: the :before and :after pseudo-elements,
the content, quotes and counter-* properties.
* Support ordered lists: all CSS 2.1 values of the list-style-type property.
* New user-agent stylesheet with HTML 5 elements and automatic quotes for many
languages. Thanks Peter Moulder!
* Disable cssutils validation warnings, they are redundant with WeasyPrint’s.
* Add --version to the command-line script.
* Various bug fixes
Version 0.2
-----------
Released on 2011-11-25.
* Support for tables.
* Support the box-sizing property from CSS 3 Basic User Interface
* Support all values of vertical-align except top and bottom. They are
interpreted as text-top and text-bottom.
* Minor bug fixes
Tables have some limitations:
Only the fixed layout and separate border model are supported.
There are also no page break inside tables so a table higher
than a page will overflow.
Version 0.1
-----------
Released on 2011-10-28.
First packaged release. Supports "simple" CSS 2.1 pages: there is no
support for floats, tables, or absolute positioning. Other than that
most of CSS 2.1 is supported, as well as CSS 3 Colors and Selectors.
---
Common Use Cases
Common Use Cases
================
Regenerate PDFs Automatically
-----------------------------
During development, you can automatically regenerate a PDF whenever an HTML or
CSS file changes. On Linux, macOS and Windows, install watchexec_.
To watch specific files, run:
.. code-block:: sh
watchexec --watch document.html --watch style.css -- python -m weasyprint document.html document.pdf
To watch all HTML and CSS files in the current directory and its subdirectories,
use an extension filter:
.. code-block:: sh
watchexec -e html,css -- python -m weasyprint document.html document.pdf
Replace the filenames in these examples with your own HTML, CSS and PDF paths.
.. _watchexec: https://watchexec.github.io/
Include in Web Applications
---------------------------
Using WeasyPrint in web applications sometimes requires attention on some
details.
Security Problems
.................
First of all, rendering untrusted HTML and CSS files can lead to :ref:security
problems <Security>. Please be sure to carefully follow the different proposed
solutions if you allow your users to modify the source of the rendered
documents in any way.
Rights Management
.................
Another problem is rights management: you often need to render templates that
can only be accessed by authenticated users, and WeasyPrint installed on the
server doesn’t send the same cookies as the ones sent by the users. Extensions
such as Flask-WeasyPrint_ (for Flask_) or Django-WeasyPrint_ (for Django_)
solve this issue with a small amount of code. If you use another framework, you
can read these extensions and probably find an equivalent workaround.
.. _Flask-Weasyprint: https://github.com/Kozea/Flask-WeasyPrint
.. _Flask: https://flask.palletsprojects.com/
.. _Django-WeasyPrint: https://github.com/fdemmer/django-weasyprint
.. _Django: https://www.djangoproject.com/
Server Side Requests & Self-Signed SSL Certificates
...................................................
If your server is requesting data from itself, you may encounter a self-signed
certificate error, even if you have a valid certificate.
You need to add yourself as a Certificate Authority, so that your self-signed
SSL certificates can be requested.
.. code-block:: bash
# If you have not yet created a certificate.
sudo openssl req -x509 \
-sha256 \
-nodes \
-newkey rsa:4096 \
-days 365 \
-keyout localhost.key \
-out localhost.crt
# Follow the prompts about your certificate and the domain name.
openssl x509 -text -noout -in localhost.crt
Add your new self-signed SSL certificate to your nginx.conf, below the lineserver_name 123.123.123.123;:
.. code-block:: bash
ssl_certificate /etc/ssl/certs/localhost.crt;
ssl_certificate_key /etc/ssl/private/localhost.key;
The SSL certificate will be valid when accessing your website from the
internet. However, images will not render when requesting files from the same
server.
You will need to add your new self-signed certificates as trusted:
.. code-block:: bash
sudo cp /etc/ssl/certs/localhost.crt /usr/local/share/ca-certificates/localhost.crt
sudo cp /etc/ssl/private/localhost.key /usr/local/share/ca-certificates/localhost.key
# Update the certificate authority trusted certificates.
sudo update-ca-certificates
# Export your newly updated Certificate Authority Bundle file.
# If using Django, it will use the newly signed certificate authority as
# valid and images will load properly.
sudo tee -a /etc/environment <<< 'export REQUESTS_CA_BUNDLE=/etc/ssl/certs/ca-certificates.crt'
Adjust Document Dimensions
--------------------------
WeasyPrint does not provide support for adjusting page size or document margins
via command-line flags. This is best accomplished with the CSS @page
at-rule, which can be added to the document or provided in a stylesheet.
Consider the following example:
.. code-block:: css
@page {
size: A3 landscape; / Change from the default size and orientation of A4 portrait /
margin: 3cm; / Set margin on each page /
}
To apply these rules from the command line without creating a separate CSS
file, use the -s option with shell process substitution:
.. code-block:: sh
$ weasyprint input.html output.pdf -s <(echo "@page { size: A3 landscape; margin: 3cm }")
There is much more which can be achieved with the @page at-rule,
such as page numbers, headers, etc. Read more about the page_ at-rule.
.. _page: https://developer.mozilla.org/en-US/docs/Web/CSS/@page
Generate Specialized PDFs
-------------------------
WeasyPrint can generate different PDF variants, including PDF/UA and PDF/A. The
feature is available by using the --pdf-variant CLI option, or thepdf_variant Python parameter of :func:HTML.write_pdf
<weasyprint.HTML.write_pdf>.
.. code-block:: python
from weasyprint import HTML
HTML(string="<p>document</p>").write_pdf("document.pdf", pdf_variant="pdf/a-3u")
.. code-block:: sh
$ weasyprint document.html --pdf-variant="pdf/ua-1" document.pdf
The different supported variants can be listed using weasyprint --help.
Even if WeasyPrint tries to generate valid documents, the result is not
guaranteed: the HTML, CSS and PDF features chosen by the user must follow the
limitations defined by the different specifications.
PDF/A (Archiving)
.................
PDF/A documents are specialized for archiving purposes. They are a simple
subset of PDF, with a lot of limitations: no audio, video or JavaScript,
defined color spaces, embedded fonts, etc.
If possible, PDF/A-3u should be preferred: it allows transparency layers that
are forbidden in A-1, and arbitrary formats for attached files that are
forbidden in A-2. The "u" part of the variant indicates that the PDF text is
available as Unicode.
PDF/A documents include a PDF identifier, that is mainly useful to indicate
that a PDF is a new version of another PDF. By default, WeasyPrint generates a
valid PDF identifier, but you can provide your own with the--pdf-identifier CLI option or pdf_identifier Python parameter.
If your document includes images, you must set the image-rendering:
crisp-edges property to avoid anti-aliasing, that is forbidden by PDF/A.
PDF/UA (Universal Accessibility)
................................
PDF/UA documents are specialized for accessibility purposes. They include extra
metadata that define document information and content structure.
The main constraint to get valid PDF/UA documents is to use a correct HTML
structure, to avoid inconsistencies in the PDF structure. The HTML order is
also used to define the order of the PDF content.
Some information is required in your HTML file, including a <title> tag,
and a lang attribute set on the <html> tag.
PDF/X (Graphics Exchange)
.........................
PDF/X documents facilitate graphics exchange and adds printing-related requirements such
as color profiles.
The easiest way to fulfill these requirements is to use device-dependent CMYK colors and
images everywhere in your document. For colors, you can use the device-cmyk()
function:
.. code-block:: css
body { color: device-cmyk(0% 10% 0% 80%) }
You also have to define the output profile color to use.
.. code-block:: css
@color-profile device-cmyk {
components: cyan, magenta, yellow, black;
src: url(path/to/cmyk-profile.icc);
}
If possible, PDF/X-4 should be preferred: it allows transparency layers that are
forbidden by previous variants.
Factur-X / ZUGFeRD (Electronic Invoices)
........................................
Factur-X / ZUGFeRD is a Franco-German standard for hybrid e-invoice, the first
implementation of the European Semantic Standard EN 16931. It enables users to
include normalized metadata in PDF invoices, such as companies information or
invoice amounts, so that compatible software can automatically read this
information. This standard is based on PDF/A-3b.
WeasyPrint can generate Factur-X / ZUGFeRD documents. Invoice metadata must be
generated by the user and included in the PDF document when rendered. Two
different metadata files are required:
- the first one is RDF metadata, containing document metadata and PDF/A
extension information;
- the second one is Factur-X / ZUGFeRD metadata, containing invoice amounts,
plus seller and buyer information.
Here is an example of Factur-X document generation.
rdf.xml:
.. code-block:: xml
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:fx="urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#"
xmlns:pdfaExtension="http://www.aiim.org/pdfa/ns/extension/"
xmlns:pdfaSchema="http://www.aiim.org/pdfa/ns/schema#"
xmlns:pdfaProperty="http://www.aiim.org/pdfa/ns/property#">
<rdf:Description rdf:about="">
<fx:ConformanceLevel>MINIMUM</fx:ConformanceLevel>
<fx:DocumentFileName>factur-x.xml</fx:DocumentFileName>
<fx:DocumentType>INVOICE</fx:DocumentType>
<fx:Version>1.0</fx:Version>
</rdf:Description>
<rdf:Description rdf:about="">
<pdfaExtension:schemas>
<rdf:Bag>
<rdf:li rdf:parseType="Resource">
<pdfaSchema:schema>Factur-X PDFA Extension Schema</pdfaSchema:schema>
<pdfaSchema:namespaceURI>urn:factur-x:pdfa:CrossIndustryDocument:invoice:1p0#</pdfaSchema:namespaceURI>
<pdfaSchema:prefix>fx</pdfaSchema:prefix>
<pdfaSchema:property>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentFileName</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>name of the embedded XML invoice file</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>DocumentType</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>INVOICE</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>Version</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The actual version of the Factur-X XML schema</pdfaProperty:description>
</rdf:li>
<rdf:li rdf:parseType="Resource">
<pdfaProperty:name>ConformanceLevel</pdfaProperty:name>
<pdfaProperty:valueType>Text</pdfaProperty:valueType>
<pdfaProperty:category>external</pdfaProperty:category>
<pdfaProperty:description>The conformance level of the embedded Factur-X data</pdfaProperty:description>
</rdf:li>
</rdf:Seq>
</pdfaSchema:property>
</rdf:li>
</rdf:Bag>
</pdfaExtension:schemas>
</rdf:Description>
</rdf:RDF>
factur-x.xml:
.. code-block:: xml
<rsm:CrossIndustryInvoice
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100">
<rsm:ExchangedDocumentContext>
<ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:ID>A1</ram:ID>
</ram:BusinessProcessSpecifiedDocumentContextParameter>
<ram:GuidelineSpecifiedDocumentContextParameter>
<ram:ID>urn:factur-x.eu:1p0:minimum</ram:ID>
</ram:GuidelineSpecifiedDocumentContextParameter>
</rsm:ExchangedDocumentContext>
<rsm:ExchangedDocument>
<ram:ID>123</ram:ID>
<ram:TypeCode>380</ram:TypeCode>
<ram:IssueDateTime>
<udt:DateTimeString format="102">20200131</udt:DateTimeString>
</ram:IssueDateTime>
</rsm:ExchangedDocument>
<rsm:SupplyChainTradeTransaction>
<ram:ApplicableHeaderTradeAgreement>
<ram:BuyerReference>Buyer</ram:BuyerReference>
<ram:SellerTradeParty>
<ram:Name>Supplyer Corp</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">123456782</ram:ID>
</ram:SpecifiedLegalOrganization>
<ram:PostalTradeAddress>
<ram:CountryID>FR</ram:CountryID>
</ram:PostalTradeAddress>
<ram:SpecifiedTaxRegistration>
<ram:ID schemeID="VA">FR11123456782</ram:ID>
</ram:SpecifiedTaxRegistration>
</ram:SellerTradeParty>
<ram:BuyerTradeParty>
<ram:Name>Buyer Corp</ram:Name>
<ram:SpecifiedLegalOrganization>
<ram:ID schemeID="0002">987654324</ram:ID>
</ram:SpecifiedLegalOrganization>
</ram:BuyerTradeParty>
<ram:BuyerOrderReferencedDocument >
<ram:IssuerAssignedID>456</ram:IssuerAssignedID>
</ram:BuyerOrderReferencedDocument>
</ram:ApplicableHeaderTradeAgreement>
<ram:ApplicableHeaderTradeDelivery/>
<ram:ApplicableHeaderTradeSettlement>
<ram:InvoiceCurrencyCode>EUR</ram:InvoiceCurrencyCode>
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
<ram:TaxBasisTotalAmount>100.00</ram:TaxBasisTotalAmount>
<ram:TaxTotalAmount currencyID="EUR">20.00</ram:TaxTotalAmount>
<ram:GrandTotalAmount>120.00</ram:GrandTotalAmount>
<ram:DuePayableAmount>120.00</ram:DuePayableAmount>
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
</ram:ApplicableHeaderTradeSettlement>
</rsm:SupplyChainTradeTransaction>
</rsm:CrossIndustryInvoice>
invoice.html:
.. code-block:: html
<h1>Invoice</h1>
Command-line::
weasyprint invoice.html invoice.pdf --attachment=factur-x.xml --attachment-relationship=Data --xmp-metadata=rdf.xml --pdf-variant=pdf/a-3a
Or Python API:
.. code-block:: python
from weasyprint import Attachment, HTML
document = HTML("invoice.html").render()
factur_x_xml = Path("factur-x.xml").read_text()
attachment = Attachment(string=factur_x_xml, name="factur-x.xml", relationship="Data")
document.metadata.attachments = [attachment]
xmp_metadata = Path("rdf.xml").read_text().encode()
document.metadata.xmp_metadata = [xmp_metadata]
document.write_pdf("invoice.pdf", pdf_variant="pdf/a-3b")
Of course, the content of these files has to be adapted to the content of real
invoices.
Include PDF Forms
-----------------
By default, form fields are transformed into pure text and graphical shapes
when exported to PDF. But WeasyPrint gives the possibility to generate real PDF
forms that can be filled with a PDF reader. These forms can even send requests
with the data filled in the PDF, just as the same form would do in a web
browser.
To transform all HTML forms into PDF forms, you can use the --pdf-forms CLI
option or pdf_forms Python parameter.
.. code-block:: python
from weasyprint import HTML
HTML(string="<input value='test'>").write_pdf("test.pdf", pdf_forms=True)
.. code-block:: sh
$ weasyprint document.html --pdf-forms document.pdf
You can also define which specific fields (input, select, textarea,button) have to be transformed into PDF forms by setting the appearance
CSS property to auto on them. In this case, as for browsers, you’ll have tothe stylesheet set by the --pdf-forms option
manually override the default style set by the user agent stylesheet. Reading
<https://github.com/Kozea/WeasyPrint/blob/main/weasyprint/css/html5_ua_form.css>_
can help to override this style.
.. code-block:: html
<style>
label { display: block }
.pdf-form { appearance: auto }
.pdf-form::before { visibility: hidden }
</style>
<label>
Can't be modified in PDF
<input value="static">
</label>
<label>
Can be modified in PDF
<input class="pdf-form" value="dynamic">
</label>
PDF forms support can be quite poor depending on the PDF reader you use. If a
feature doesn’t work for you, please check that this feature is actually
supported by your PDF reader before reporting a bug.
Define PDF Metadata
-------------------
PDF documents can include various metadata, such as title, authors or creation
date. The easiest way to define them is to include them in your HTML file:
these fields are normalized and can be automatically picked up by WeasyPrint.
.. code-block:: html
<html lang="en">
<head>
<title>PDF Sample with Metadata</title>
<meta name="author" content="Jane Doe">
<meta name="author" content="John Doe">
<meta name="generator" content="HTML generator">
<meta name="keywords" content="HTML, CSS, PDF">
<meta name="dcterms.created" content="2000-12-31T12:34:56+02:00">
<meta name="dcterms.modified" content="2010-07-14">
<meta name="description" content="This is a simple sample">
</head>
</html>
HTML metadata values listed here, including language and title, are stored in
the corresponding, normalized fields in PDF.
If you use custom metadata fields, they are not stored in PDF by default. You
can include them in the PDF info dictionary using the --custom-metadata CLI
option or the custsom_metadata Python parameter.
.. code-block:: python
from weasyprint import HTML
HTML(string="<meta name="recipe" content="fries">").write_pdf("recipe.pdf", custom_metadata=True)
.. code-block:: sh
$ weasyprint document.html --custom-metadata document.pdf
Attach Files
------------
You can attach files to your generated PDF. These files can be opened when a
link is clicked in the PDF, or just available in the list of attached files in
your PDF reader.
To attach a file with a regular link, you can use a regular anchor with therel attribute set to attachment.
.. code-block:: html
<a rel="attachment" href="note.txt">view attached note</a>
To attach a file globally to the document, you can add a link tag in yourhead:
.. code-block:: html
<link rel="attachment" href="note.txt">
If you don’t want to attach your files using HTML tags, you can also use the--attachment CLI option, multiple times if needed.
.. code-block:: sh
$ weasyprint document.html --attachment note.txt --attachment photo.jpg document.pdf
In a Python script, you can also attach files using the
:class:weasyprint.Attachment class.
.. code-block:: python
from weasyprint import Attachment, HTML
attachments = [Attachment("note.txt"), Attachment("photo.jpg")]
HTML(string="<p>PDF with attachments</p>").write_pdf("recipe.pdf", attachments=attachments)
Cache and Optimize Images
-------------------------
WeasyPrint provides many options to deal with images: optimize_images,jpeg_quality, dpi and cache.
optimize_images can enable size optimization for images. When enabled, the
generated PDF will include smaller images with no quality penalty, but the
rendering time may be slightly increased.
The jpeg_quality option can be set to decrease the quality of JPEG images
included in the PDF. You can set a value between 95 (best quality) to 0
(smaller image size), depending on your needs.
The dpi option offers the possibility to reduce the size (in pixels, and
thus in bytes) of all included raster images. The resolution, set in dots per
inch, indicates the maximum number of pixels included in one inch on the
generated PDF.
.. code-block:: python
# Original high-quality images, faster, but generated PDF is larger
HTML('https://weasyprint.org/').write_pdf('weasyprint.pdf')
# Optimized lower-quality images, a bit slower, but generated PDF is smaller
HTML('https://weasyprint.org/').write_pdf(
'weasyprint.pdf', optimize_images=True, jpeg_quality=60, dpi=150)
cache gives the possibility to use a cache for images, avoiding to
download, parse and optimize them each time they are used.
By default, the cache is used document by document, but you can share it
between documents if needed. This feature can save a lot of network and CPU
time when you render a lot of documents that use the same images.
.. code-block:: python
cache = {}
for i in range(10):
HTML(f'https://weasyprint.org/').write_pdf(
f'example-{i}.pdf', cache=cache)
It’s also possible to cache images on disk instead of keeping them in memory.
The --cache-folder CLI option can be used to define the folder used to
store temporary images. You can also provide this folder path as a string forcache.
Improve Rendering Speed and Memory Use
--------------------------------------
WeasyPrint is often slower than other web engines. Python is the usual suspect,
but it’s not the main culprit here. :ref:Optimization is not the main goal of
WeasyPrint <Why Python?> and it may lead to unbearable long rendering times.
First of all: WeasyPrint’s performance gets generally better with time. You can
check WeasyPerf_ to compare time and memory needed across versions.
Some tips may help you to get better results.
- A high number of CSS properties with a high number of HTML tags can lead to a
huge amount of time spent for the cascade. Avoiding large CSS frameworks can
drastically reduce the rendering time.
- Tables are known to be slow, especially when they are rendered on multiple
pages. When possible, using a common block layout instead gives much faster
renderings.
- Optimizing images and fonts can reduce the PDF size, but increase the
rendering time. Moreover, caching images gives the possibility to read and
optimize images only once, and thus to save time when the same image is used
multiple times. See :ref:Cache and Optimize Images.
.. _WeasyPerf: https://kozea.github.io/WeasyPerf/
Show Log Messages
-----------------
Most errors (unsupported CSS property, missing image…) are not fatal and will
not prevent a document from being rendered. WeasyPrint uses the :mod:logging
module from the Python standard library to log these errors and let you know
about them.
When WeasyPrint is launched in a terminal, logged messages will go to the
standard error stream (stderr) by default. When used as a library, logs are
not displayed at all. You can change that by configuring the weasyprint
logger object:
.. code-block:: python
import logging
logger = logging.getLogger('weasyprint')
# Display warnings, errors and critical messages.
logger.setLevel(logging.WARNING)
# Save logs to the weasyprint.log file.
logger.addHandler(logging.FileHandler('weasyprint.log'))
# Print logs on console.
logger.addHandler(logging.StreamHandler())
The weasyprint.progress logger is used to report the rendering progress. It
is useful to get feedback when WeasyPrint is launched in a terminal (using the--verbose or --debug option), or to give this feedback to end users
when used as a library.
See the documentation of the :mod:logging` module for details.
---