HTML to PDF Tools

Discussions center on libraries and tools for converting HTML/CSS to PDF, such as wkhtmltopdf, WeasyPrint, headless Chrome, and Puppeteer, with comparisons to alternatives and some mentions of PDF to HTML conversion.

➡️ Stable 0.8x Web Development
2,925
Comments
20
Years Active
5
Top Authors
#4821
Topic ID

Activity Over Time

2007
3
2008
24
2009
58
2010
128
2011
92
2012
146
2013
157
2014
135
2015
96
2016
126
2017
275
2018
192
2019
134
2020
123
2021
232
2022
167
2023
221
2024
308
2025
298
2026
10

Keywords

WCAG JS math.nist WeasyPrint DIDN courtbouillon.org ebook.com UI TEX Paged.js pdf html pdfs css html css chrome chromium package image kevin

Sample Comments

pylotlight Dec 20, 2025 View on HN

HTML -> PDF was also a use case I've used previously FYI

ak39 Nov 2, 2017 View on HN

Any info how this compares to commercial html to pdf renderers like PrinceXML?

TheCapeGreek Jan 14, 2026 View on HN

I've never found any lib or tooling (in my ecosystem) that DIDN'T use html -> pdf

LogicX Jul 11, 2012 View on HN

I'll echo another - how about wkhtmltopdf ?

abhinav22 Apr 5, 2021 View on HN

Try the HTML / CSS / Paged.js workflow with headless chrome - I think it works really well (and open source / free with the exception of Chrome, where you are a bit at the mercy of Google, but they are unlikely to make any breaking changes in my opinion)

Tommix11 Jan 8, 2025 View on HN

Also, html 2 pdf would be nice too. :-)

megamindbrian Oct 5, 2017 View on HN

Wkhtmltopdf has done this years ago.

dandermotj Apr 7, 2016 View on HN

Somebody please package the html into a pdf!

aviraldg Mar 21, 2016 View on HN

wkhtmltopdf works quite well, I've used it before. A bit of a hassle to get it compiling though.

bn-l Oct 28, 2024 View on HN

How did you go from HTML to PDF?