0

I am trying to convert HTML to PDF in puppeteer. On my local server, everything works fine, it takes sometime but it works for even html containing large images. However on my azure server, for html containing small images, it works fine. But for a html that contains a large image ( around 6.5MB ), it is not giving any output nor throws error. I have disabled timeout to 0 for page.pdf options and for setDefaultNavigationTimeout(0).

My code:

const browser = await puppeteer.launch()      
const page = await browser.newPage()
await page.setDefaultNavigationTimeout(0)
await page.setContent(contentHtml);
await page.pdf({ 
                 path: `./${name}.pdf`, 
                 printBackground: true,
                 timeout: 0
                })
await browser.close();

Are there any other timeout or anything like that on server level?

0 Answers0