2 ms·
As I'm currently fighting with css3/paged media[pm] - I've recently tried to figure it out. Theres a rather comprehensive list at: https://www.print-css.rocks/
by e12e 4y ago
As I'm currently fighting with css3/paged media[pm] - I've recently tried to figure it out.
Theres a rather comprehensive list at: https://www.print-css.rocks/tools https://www.print-css.rocks/tools
As far as Foss tools go, I've only found paged.js (a polyfyll) in combination with a browser print-to-pdf (eg wkhtmltoodf (webkit) or puppeteer (chrome)) that has any semblance of css support.
There's also ghostscript - but AFAIK it doesn't support much/any css3 for print.
[pm] https://www.w3.org/TR/css-page-3/ https://www.w3.org/TR/css-page-3/
- 2rsf 4y agoI've seen Puppeteer being used successfully in a few projects, it's ugly as hell (you need a VM, a browser and extra software to generate a file) and might require maintenance but it works quite well for simple, mostly textual documents.
- password4321 4y agoPlaywright is a new favorite browser automation tool, I wonder if they've done anything to help with generating PDFs?
- e12e 4y agoThe main issue with the browser based tools is that developers seem to have given up on implementing html/css print standards. So there's a limit to what automation tools have to work with, so to speak. That said, paged.js makes a good effort.
- mdaniel 4y agohttps://playwright.dev/docs/cli#generate-pdf https://playwright.dev/docs/cli#generate-pdf