You need to try pagedjs. Which is kinda what this thread is all about.
Maybe 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.
you can run the command line version. so in your scenario pandoc-> html, pagedjs cli -> PDF
Ah 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.
I'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/
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.