html to pdf in nodejs (no dependency to phantomjs)

8.3k Views Asked by At

I am generating pdf from dynamic html (using handlebars) using html-pdf package in nodejs.

The problem is that it is dependent to phantom js that is now deprecated And I am not allowed to use this package anymore.

What replacement can I use?

1

There are 1 best solutions below

0
On BEST ANSWER

I would recommend to use https://github.com/devongovett/node-wkhtmltopdf but this one has less options about footers/headers than html-pdf.

Otherwise I would use https://github.com/GoogleChrome/puppeteer