4 ms·
The Paged Media spec on counters and counter-resets paints implementations into a corner. They can't both comply with the spec and implement page count resets o
by trynewideas 4y ago
The Paged Media spec on counters and counter-resets paints implementations into a corner. They can't both comply with the spec and implement page count resets on page breaks. This has been a known issue with the spec since 2013[1][2] and been a thorn in implementations since.[3]
1: https://www.w3.org/Style/CSS/Tracker/issues/334 https://www.w3.org/Style/CSS/Tracker/issues/334
2: https://github.com/w3c/csswg-drafts/issues/4760 https://github.com/w3c/csswg-drafts/issues/4760
3: https://github.com/Kozea/WeasyPrint/issues/93#issuecomment-465932507 https://github.com/Kozea/WeasyPrint/issues/93#issuecomment-4...
- lazyeye 4y agoHere's some PHP code to handle page numbering (page breaks are no problem at all rendering html to pdf) :- <?php $pagenum = 1; $pagenum++; print("Page: $pagenum"); ?>