WeasyPrint
WeasyPrint copied to clipboard
Add support for named areas
The WHATWG Living Idea CSS Books specifies named areas for running elements in paged media, which extend the regular @top-left-corner
/@top-left
/@top-center
/etc. CSS rules by extra @area
rules that allow for arbitrarily positioned running content. I am well aware that this specification is far from being a W3C standard or even a draft. Nevertheless the document states that "most of this specification has been interoperably implemented and is in daily use by publishers", and in fact commercial PrintCSS software like AntennaHouse or Prince seem to support named areas.
I didn’t dive into the code of WeasyPrint, but from my perspective this seems like a relatively easy to implement feature. Are there any plans on supporting named areas?
Hello!
I am well aware that this specification is far from being a W3C standard or even a draft. Nevertheless the document states that "most of this specification has been interoperably implemented and is in daily use by publishers", and in fact commercial PrintCSS software like AntennaHouse or Prince seem to support named areas.
I don’t see it supported in Prince’s CSS reference or in the pretty old status page of CSS Books implementation. Are you sure that this feature is supported?
I didn’t dive into the code of WeasyPrint, but from my perspective this seems like a relatively easy to implement feature. Are there any plans on supporting named areas?
Unfortunately, there are lots of features that are often already well specified and that people would like to see implemented… As I’ve said in many comments, implementing specifications is long and hard enough, maybe there’s no need to implement features that are not specified yet :wink:.
Even if it’s not obvious, implementing is the easy part. Maintaining is the real problem, even more when there’s no specification. The best way to see this feature implemented in WeasyPrint is to include it in a W3C specification draft.
Hi!
I don’t see it supported in Prince’s CSS reference or in the pretty old status page of CSS Books implementation. Are you sure that this feature is supported?
You are right. Double checking the available documentation, I must admit, that in fact neither AntennaHouse nor Prince mention named areas. Both do however seem to support (nearly) all other features of the WHATWG CSS Books specification, so support for named areas is probably just a matter of time.
A working implementation is available from typeset.sh. (See also their 'Invoice' demo for an example, why @area
rules are a cool feature.)
Unfortunately, there are lots of features that are often already well specified and that people would like to see implemented… As I’ve said in many comments, implementing specifications is long and hard enough, maybe there’s no need to implement features that are not specified yet 😉.
Even if it’s not obvious, implementing is the easy part. Maintaining is the real problem, even more when there’s no specification. The best way to see this feature implemented in WeasyPrint is to include it in a W3C specification draft.
I do understand your concerns. On the other hand, named areas are specified, albeit not in a W3C publication. 😉
Hello!
(The survey is now closed. Thanks for all your answers! We’ll share the results soon 😉)
If you’re interested in named areas, we created a short survey where you can give a boost to this feature and help us to improve WeasyPrint 😉
Vote for it!
Hello!
As it’s soon our 2-year anniversary as CourtBouillon, we opened a short survey to know more about your expectations. Don’t hesitate to support this feature and give it a boost 🚀!
The survey will be opened until October 10th.
Update: the survey is now closed. You can find the results here.
Hello!
As you may know, two weeks ago was CourtBouillon 3-year anniversary 🎉.
For this occasion, we prepared a short survey to have your opinion on this year’s features and to know what you’d like to see in the future! Don’t hesitate to give a boost to this feature ✨️
The survey is opened until November 19.