if you are doing html to pdf, you might also need the ability to merge. a few more features and you're better of with a commercial solution.
Merge what?
Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
31–40 of 170 posts
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#32Please don't turn nice formats into a format that's similar to screenshots of text. Pandoc has an option to pack all images and styles needed to render the page into one html file: pandoc --self-contained input.html -o output.html
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#33Please don't turn nice formats into a format that's similar to screenshots of text. Pandoc has an option to pack all images and styles needed to render the page into one html file: pandoc --self-contained input.html -o output.html
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#34Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#35Just print to PDF in a browser, or automate that using a browser automation tool. For a non-browser-based open source solution, WeasyPrint. https://weasyprint.org/ For a proprietary solution, try Prince XML: https://www.princexml.com/
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#36Don’t. Show a web page and open the print dialog, and tell people to save as PDF. All major browsers support this, and the browser HTML to PDF code is the most robust and accurate.
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#37Please don't turn nice formats into a format that's similar to screenshots of text. Pandoc has an option to pack all images and styles needed to render the page into one html file: pandoc --self-contained input.html -o output.html
Being (not so easily) edited is often a feature, not a bug.
pandoc input.html -o output.pdf --pdf-engine=
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#38[dead]
Re: Ask HN: What is nowadays (opensource) way of converting HTML to PDF?
#39Just print to PDF in a browser, or automate that using a browser automation tool. For a non-browser-based open source solution, WeasyPrint. https://weasyprint.org/ For a proprietary solution, try Prince XML: https://www.princexml.com/
I previously used WKHTMLTOPDF, but it hasn't been supported for years and doesn't support the latest CSS, etc. It does support JS if you need it, but I'd probably look at headless Chromium or another solution for JS if needed.
Edit: Previous post with some good discussion: https://news.ycombinator.com/item?id=26578826