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!