Wolverine
Wolverine

Reputation: 27

HTML-PDF using puppeteer in node

I want to convert html to pdf. I have already tried phantomjs (which is giving timeout error all the time) and wkhtmltopdf (which is very slow,taking 10 mins to get downloaded) .

Now I tried puppeteer but I don't know how to do, first I tried installing puppeteer and its giving this error

ERROR: Failed to download Chromium r662092! Set "PUPPETEER_SKIP_CHROMIUM_DOWNLOAD" env variable to skip download.

Can someone please help me to get over this html to pdf conversion

Upvotes: 0

Views: 1128

Answers (1)

David R
David R

Reputation: 15667

In your .npmrc file you have to add the below line to get rid of this error,

puppeteer_skip_chromium_download=true

Hope this helps!

Upvotes: 1

Related Questions