DEV Community

Discussion on: Generating PDF from HTML with Node.js and Puppeteer

Collapse
 
hmadrigal profile image
hmadrigal • Edited

I would like to suggest an additional option. The library wkhtmltopdf.org can be used, it is open source and based on WebKit which helps you to reduce issues of rendering. Also, it has options for customizing headers and footers thru custom js/HTML. It is available in all. most major OS, the only drawback it is that it is a native binary, implying there will be needed bindings (e.g DLLImports in C#) or calling the executable starting a new process (and specifying processing in the command line)

Collapse
 
caleywoods profile image
Caley Woods

This is what I ended up going with several years ago when there was a request to be able to receive a PDF copy of an invoice that we were already creating with HTML / CSS. Worked well enough.