Latest version of WeasyPrint is v0.41,
released on October 5, 2017
WeasyPrint 0.41 has been released.
WeasyPrint now depends on pdfrw >= 0.4.
Support page marks and bleed.
Don’t crash on unsupported image-resolution values.
Fix @font-face use with write_* methods.
Improve readability of _select_source function.
Use CSS prefixes as recommanded by the CSSWG.
Fix rendering problems and crashes when using @font-face.
Try to break pages after a block before trying to break inside it.
Fix and test corner cases about named pages.
Add missing libpangocairo dependency for Debian and Ubuntu.
Add documentation on logged rendering steps.
WeasyPrint 0.40 has been released.
WeasyPrint now depends on cssselect2 instead of cssselect and lxml.
- Unprefix properties, see
- Add a “verbose” option logging the document generation steps.
Fix slow performance with long pre-formatted texts.
Improve speed and memory usage for long documents.
Don’t crash on local() fonts with a space and no quotes.
WeasyPrint 0.39 has been released.
- Fix the use of WeasyPrint’s URL fetcher with CairoSVG.
WeasyPrint 0.38 has been released.
Don’t crash on font-face’s src attributes with local functions.
WeasyPrint 0.37 has been released.
WeasyPrint now depends on tinycss2 instead of tinycss.
Support local links in generated PDFs.
Use a NullHandler log handler when WeasyPrint is used as a library.
Don’t crash on some line breaks.
Don’t crash with replaced elements with height set in percentages.
Remove incorrect line breaks.
Let the logging module do the string interpolation.
WeasyPrint 0.34, 0.35 and 0.36 have been released.
Warn user about broken cairo versions.
Typos fixed in command-line help.
Fix AssertionError in split_text_box.
Honor the presentational_hints option for PDFs.
Avoid CairoSVG-2.0.0rc* on Python 2.
Correctly close files open by mkstemp.
Cast the number of columns into int.
- Fix multi-page multi-columns and add related tests.
WeasyPrint 0.33 has been released.
Add tests on MacOS.
Enable @font-face on MacOS.
Always update resume_at when splitting lines.
Don’t build universal wheels.
Fix logic when finishing block formatting context.
WeasyPrint 0.32 has been released.
Support @font-face on Linux.
- Support CSS fonts level 3 almost entirely, including OpenType features.
Support presentational hints (optional).
- Support break-after, break-before and break-inside for pages and columns.
Major performance boost.
Respect white-space for shrink-to-fit.
Fix the preferred width for column groups.
- Handle relative boxes in column-layout boxes.
- Add more and more documentation about Windows installation.
Add fonts requirements for tests.
WeasyPrint 0.31 has been released.
- #124: Add MIME sniffing for
- #60: CSS Multi-column
- #197: Add hyphens at line
breaks activated by a soft hyphen.
- #132: Fix Python 3
compatibility on Windows.
- #329: Add documentation
about installation on Windows.
WeasyPrint 0.30 has been released.
WeasyPrint now depends on html5lib-0.999999999.
- Fix Acid2
Cutting lines is broken in page margin boxes.
Newest html5lib 0.999999999 breaks rendering.
WeasyPrint 0.29 has been released.
Don’t crash with floats with percents in positions.
Fix CairoSVG 2.0 pre-release dependency in Python 2.x.
WeasyPrint 0.28 has been released.
white-space: nowrap still wraps on hyphens
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
WeasyPrint 0.27 has been released.
Support the ‘rem’ unit.
Enhance the support of SVG images.
Fix the layout of cells larger than their tables.
- The website is now on GitHub Pages, the documentation is on Read the Docs.
Rewrite the CSS chapter of the documentation.
WeasyPrint 0.26 has been released.
- Support the
- Respect table, column and cell widths.
Unable to set table column width on tables td’s.
Table background colour bleeds beyond table cell boundaries.
TypeError: unsupported operand type(s) for +: ‘float’ and ‘str’.
Unwanted line-breaks in bold text.
AttributeError: ‘Namespace’ object has no attribute ‘attachments’.
WeasyPrint 0.20: Border radius
WeasyPrint 0.20 has been released with new features and bug fixes.
- Add support for
- Feature #77: Add PDF
metadata from HTML.
- Feature #12: Use html5lib.
- Tables: handle percentages for column groups, columns and cells, and values
for row height.
- Bug fixes:
- Fix #84: don’t crash when
stylesheets are not available.
- Fix #101: use page ids
instead of page numbers in PDF bookmarks.
logger.warning instead of deprecated
font-stretch in the
WeasyPrint 0.16: PDF zoom and bug fixes
A small release this time.
zoom parameter on PDF output can change
the ratio between CSS length units and PDF units.
The various CSS units however still have the same relative ratios:
a CSS pixel is always one 96th of an inch.
This can be a work-around for using an existing fixed-width CSS layout
on various page sizes.
A few bugs in WeasyPrint were fixed and some in pycairo were worked around.
This restores compatibility with Debian Squeeze and other distributions that
still use broken versions of pycairo.
Changelog for 0.16.
WeasyPrint 0.15: More API, more docs, more fixes
0.15 is (finally!) out. This one is light in CSS features, but
Sphinx-based documentation as well as a new API with low-level access
to individual pages.
Backward-incompatible change: the
HTML.get_png_pages() method is gone,
it was ridiculously specific compared to the new API. It can be reproduced
"""Yield (png_bytes, width, height) tuples."""
for page in document.pages:
Changelog for 0.15.
WeasyPrint 0.13: PyGTK compatibility
0.13 will fall back on PyGTK if PyGObject 3 is not available.
This enables WeasyPrint to run and pass its tests on Debian Squeeze
(the current stable, as of this writing.)
Hopefully this will make WeasyPrint easier to install on more platforms
such as OS X. Testers wanted!
WeasyPrint 0.12: border-collapse and Flask-WeasyPrint
WeasyPrint 0.12 is out.
This release adds support for the collapsing border model of tables, through
border-collapse property. Previously, table borders were always
separated. This new model is incompatible with table headers and footers:
are treated like normal
<tbody> groups and are not repeated on each page.
On an unrelated note, 0.12 also adds the URL fetcher
hook to the public API. It allows to control or override how WeasyPrint
accesses HTTP or other URLs for HTML documents, CSS stylesheets, and images.
a new extension that makes use of an URL fetcher to integrate WeasyPrint
in a Flask application.
WeasyPrint 0.11: floats, Acid2 and unprefixing
WeasyPrint 0.11 is out.
It has not been long since 0.10, but the point of this release is to
finally merge the support for floats and clear that we have had for a
while in an experimental branch.
With this (and countless other bug fixes), WeasyPrint now passes the
Acid2 test! See the details or try it yourself:
weasyprint http://www.webstandards.org/files/acid2/test.html acid2.pdf
weasyprint http://www.webstandards.org/files/acid2/test.html acid2.png
And now for something completely different, the
size properties are unprefixed. The prefixed form
-weasy-size) is ignored but gives a specific warning.
You will need to change your stylesheets if you used any of these with a
As usual, the details of less visible changes are in the
WeasyPrint 0.8, tinycss and cssselect
Some new features as
usual. The big one is automatic layout for tables. Roughly, columns will get
their width determined by the amount of content.
Other important but more underlying changes are
cssselect. tinycss is a new CSS parser
I wrote from scratch as a smaller and faster alternative to
cssutils. You can
read more about it on my blog. As
to cssselect, I took over its maintenance after extracting it from
lxml. It now supports most Level 3 selectors and can be
extended more easily.
WeasyPrint 0.4 to 0.7; BSD license
I’ve been neglecting this “news” section for a while, and a lot has happened
Versions 0.4 to 0.7 of WeasyPrint have brought many
new features. The
big ones are Python 3 support, page headers and footers with page counters,
justified text, 2D transforms, and better page break control. The list of
missing CSS 2.1 features is shrinking
Features aside, and perhaps more importantly, the project is now BSD-licensed
starting from 0.7.1. (I did not bother to re-release the previous version
with the new license, but just ask if you need them.)
This less restrictive license will hopefully bring more users.
By the way, the project’s mailing-list is now up and running.
WeasyPrint 0.3: SVG images and generated content
New WeasyPrint release. The big features in 0.3 are SVG images and generated
content with the
As usual, everything is in the changelog.
To use the latest and greatest WeasyPrint, you’ll need to upgrade
cssutils to 0.9.8 and install
Tables in WeasyPrint!
I just released WeasyPrint 0.2, now with tables!
This new version also has other minor new features and bug fixes. See the
WeasyPrint 0.1 is released
WeasyPrint finally got its first release!
It’s a rendering engine for HTML and CSS that produces PDF.
This 0.1 release has support for basic CSS2.1 without tables, floats or
absolute positioning. However it can already be useful for documents with
a “simple” layout.
Grab it, use it, hack it: