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 :(
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?