4 ms·
> it falls down when you need control of anything other than basic stuff like the font size This is definitely not the case anymore, and BreezyPDFLite supports
by deedubaya 8y ago
> it falls down when you need control of anything other than basic stuff like the font size
This is definitely not the case anymore, and BreezyPDFLite supports most of the features you mention, while supporting the same HTML/CSS/JS you might be displaying to end users across evergreen browsers.
- wolfgang42 8y agoDoes BreezyPDFLite support CSS like this? Chrome didn't support any of this last I checked. h2 {flow: static(header);} @page :right { margin-bottom: 1.4cm; @top-left {content: flow(header);} @bottom-right {content: counter(page);} } Edit: Also, tables of contents, with page numbers and links in the PDF: ul.toc a::after {content: leader('.') target-counter(attr(href), page);}
- deedubaya 8y agoI'm not sure about those specific selectors, you'd need to check caniuse.com Building TOC is just as easy as building the HTML and linking to the ID's appropriately. Page numbers are supported in header/footer templates, or via manual computation when you render the HTML or with JS.
- jim-a-1020401 8y agoNo browsers support those features from all the testing I've been doing over the past month or two. Weasyprint supports everything I tried except target-counters and dot leaders which I've only found support for with princexml. Weasyprint does author a proper outline within the PDF so my current workflow (no $ for prince) is to use Weasyprint to make the PDF with a TOC that has no page numbers, extract the outline from the PDF with a python tool to get the page numbers, update the original HTML with page numbers then run it through Weasyprint again. That'll be bundled in an automated build thing triggered by a git commit of the original markdown file straight to PDF so it's not something I have to do manually each time.