WeasyPrint v58 Has Been Released
Version 58 of WeasyPrint has been released. It comes with a main new feature and minor bug fixes 🎉.
This stable version includes the main change from the beta version: PDF forms!
PDF forms support has been added thanks to the financial support of Personalkollen. It’s been a real pleasure to develop this feature with them 😻.
Version 58 also includes many small bug fixes since the beta version, with a better default stylesheet for (non-PDF) forms, better SVG gradients, an optimization for some JPEG images, a bug fix for transformed backgrounds, and some crash fixes.
As always, our work on WeasyPrint includes a lot of less visible but critical tasks.
Some of the work required for managing PDF forms is really close to what was already done for anchors and links. This was a good opportunity to reorganize and optimize the code required to parse the paginated document and find the different required elements.
Many tests have also been added, in order to improve WeasyPrint’s code coverage and reliability. Regressions are always very frustrating for users 👿, that’s why we try hard to avoid them! Most of our bug fixes come with one or more tests to be sure that these issues won’t come again.
Some corner cases are a bit complicated to tests too, and gradients are a good example. Getting pixel-perfect renderings is important for fully automated tests, but common gradients can give strange rasterisation results. Moreover, gradients have a lot of combinations: translations, rotations, zooms, relative units…
In this release, we greatly improved tests for gradients by finding test cases that are both useful (to test different combinations) and reliable (with a reliable raster rendering). This work was quite long, and sometimes a bit painful, but it was important to get simpler and more accurate gradients in SVG images.
Thanks to everyone working around our libraries 🙏, thanks to our wonderful contributors 💜, we’ll continue to do our best to make WeasyPrint easy to hack, to debug, to package, and of course to use!
What’s Coming Next?
What will be included in the next version of WeasyPrint? That’s a good question, and our previous assumptions have always been wrong!
The answer is actually up to you. If you really want some features to come earlier, if you want to fix the bug that’s been blocking for your application don’t hesitate to send a message to share your needs with us. You can also become a sponsor on OpenCollective and help us to keep on developing WeasyPrint. We’ve had a very good time working with our different clients so far, and it’s always a pleasure to see that the work accomplished for our different sponsors is available for all our users.
It’s now your turn to work! Install version 58 and give us some feedback. We hope that the different improvements brought by this release will be helpful for you.