News for hackers. Stuff that matters.
Re:Show HN: PDFs from HTML by runxel on Monday April 05, 2021 @11:53AM (#26700586)
True, 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.

Re:Show HN: PDFs from HTML by adamjhyde on Monday April 05, 2021 @01:21PM (#26701801)
You need to try pagedjs. Which is kinda what this thread is all about.
Re:Show HN: PDFs from HTML by runxel on Monday April 05, 2021 @01:30PM (#26701914)
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.

Re:Show HN: PDFs from HTML by adamjhyde on Monday April 05, 2021 @01:40PM (#26702021)
you can run the command line version. so in your scenario pandoc-> html, pagedjs cli -> PDF
Re:Show HN: PDFs from HTML by runxel on Monday April 05, 2021 @02:12PM (#26702447)
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.

Re:Show HN: PDFs from HTML by adamjhyde on Tuesday April 06, 2021 @02:44PM (#26715692)
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/