marcbachmann / node-html-pdf

This repo isn't maintained anymore as phantomjs got dreprecated a long time ago. Please migrate to headless chrome/puppeteer.
MIT License
3.56k stars 545 forks source link

pdf.create(html) not respond on Azure WebApp #631

Closed tarcisiopqdt closed 3 years ago

tarcisiopqdt commented 3 years ago

I try this: pdf.create(html, { format: 'Letter' }).toFile('result.pdf', (err) => { if (err) return res.status(500).send(err) return res.status(200).send("ok") })

but, it works only in my localhost environment.

When I hosted my application on Azure, this function never returns anything! And azure gives me this error message: "The page cannot be displayed because an internal server error has occurred.". It does not execute the line: " if (err) return res.status(500).send(err)"

I'm using, node 14.16.0, and my entire application works fine on Azure, only the html-pdf not works on it :(

Does anyone have any ideas?

tarcisiopqdt commented 3 years ago

I solved this doing an upgrade of tier (to DEV B1)