3 ms·
Weasyprint is great, but be prepared to start hacking its layout engine for more complex generations. It's nowhere near as mature as PrinceXML.
by sonthonax 6y ago
Weasyprint is great, but be prepared to start hacking its layout engine for more complex generations.
It's nowhere near as mature as PrinceXML.
- runxel 6y agoTrue, it sometimes can get messy to get a decent output. But the dev team behind is currently working on replacing Cairo with a custom Python solution as layouting engine. This will hopefully solve a lot of headaches down the road. Sure, PrinceXML is unmatched. Same goes for the price tag. I know professional CAD software which costs less. Really not doable for smaller offices e.g. Its astonishing that there is no real, great open source alternative for this. Don't get me wrong, Weasyprint is great, but has _a lot_ of dependencies and is a nightmare to install on Windows. Works decent on WSL, tho.
- adamjhyde 6y agoYou need to try pagedjs. Which is kinda what this thread is all about.
- runxel 6y agoMaybe I am missing something very obvious, but how do I get a PDF out of it in an automated way? That's what I like about pandoc + weasyprint. I just have a plain ol' markdown document and I receive a nice PDF in an instant. Just like that, super easy.
- adamjhyde 6y agoyou can run the command line version. so in your scenario pandoc-> html, pagedjs cli -> PDF
- runxel 6y agoAh yes, thanks. I missed that somehow when I took a quick look on paged.js. Do you have much experience with paged.js? I wonder what the benefits over weasyprint are.
- adamjhyde 6y agoI'm part of the pagedjs team so my outlook is pretty biased :) Perhaps have a look at the docs on the site https://www.pagedjs.org/ https://www.pagedjs.org/