CourtBouillon

Authentic people growing open source code with taste

WeasyPrint v57: Beta Time

WeasyPrint v57 is the next major version of WeasyPrint. We released a beta, you can give it a try and help us to have a nice stable major release! Letโ€™s see what we got in this version ๐Ÿค“!

PDF/UA Support

Thanks to Novareto who sponsored this feature, WeasyPrint is now able to generate PDF/UA documents ๐ŸŽ‰!

PDF/UA is a specific PDF version for accessibility purposes that ensures access to people using assistant technologies like screen readers.

How to Generate PDF/UA Documents?

Previously, we added a new option in WeasyPrint, --pdf-variant, to let you choose which PDF variant you want among different PDF/A variant. To generate PDF/UA documents, you just need to use this option and use the variant pdf/ua-1.

Is the Structure of the Document Important?

To generate a PDF/UA document, the HTML structure of the document is put in the PDF, and so has to be consistent to ensure a nice output when using an assistant technoloy.

Your HTML structure is then very important to have a conforming PDF/UA document. You can try your HTML on a HTML validator, try your PDF on a PDF validator or ask us for some help ๐Ÿ˜‰.

As for the PDF/A generation, PDF/UA support is experimental, so donโ€™t hesitate to open a new issue if you encounter problems with it!

Font Variant Support

Thanks to our OpenCollective backers and sponsors, WeasyPrint now supports variable fonts ๐ŸŽ‰!

A variable font allows you to have different typefaces of a font in a single file, rather than one per typeface.

Until now, if you wanted to use, for example, the bold and the italic version of a font, you needed to define two @font-face rule in your CSS, one for the bold version and one for the italic.

But this time is over! With the variable fonts support, if your font supports bold and italic variants, you just need to define one @font-face rule. The rendering will be automatically adapted if you set font-weight or font-style on your text, or if you use tags like <em> or <strong>.

You can also use the font-variation-settings attribute to choose non-standard variants proposed by your variable fonts.

Better Support of Footnotes With Multicolumn Layout

With the financial support of Code & Co., weโ€™ve been able to improve the support of footnotes in multicolumn layout ๐ŸŽŠ!

When using multicolumn layout, footnotes tended to be rendered on the next page with no reason, or to be in the wrong order (and nobody wants that ๐Ÿ˜Ÿ).

These problems are fixed, among a lot of other small issues that appeared when we worked on this. Footnotes with multicolumn layouts now work much better!

Better List Management on Page Breaks

Thanks to the financial sponsoring of OpenZeppelin, list items management has been improved on page breaks ๐ŸŽŠ!

When a list, ordered or unordered, was going over a page break, the position of the marker on the next page was a bit weird and not aligned with the text.

This issue is now fixed, the list marker and the text are nicely aligned when going through a page break. You can use long lists without any problem ๐Ÿ˜„!

What Are the Next Steps?

The next step is yours! Donโ€™t hesitate to try this beta and report bugs you may find ๐Ÿœ.

The one after is to fix the reported bugs and release a nice WeasyPrint version 57.

Thanks again to Novareto, Code & Co. and OpenZeppelin for sponsoring these features and fixes. Itโ€™s always a pleasure to work with you ๐Ÿ˜ป.

And of course, thanks to our OpenCollective backers and sponsors for sponsoring us and give us time to add new features, fix bugsโ€ฆ in WeasyPrint ๐Ÿ’œ.

Have fun with this beta!

And by the way, if you didnโ€™t know, we launched a survey about WeasyPrint. Itโ€™s opened until October 10th, donโ€™t hesitate to answer!