From 71606f5b57f63e476e976a25554cfda4d6185f66 Mon Sep 17 00:00:00 2001 From: Panduss Date: Wed, 8 Feb 2023 16:26:13 +0100 Subject: [PATCH] added some console logs --- dist/index.js | 5 +++++ src/index.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dist/index.js b/dist/index.js index 438099d..665fc72 100644 --- a/dist/index.js +++ b/dist/index.js @@ -118433,10 +118433,15 @@ async function generatePdf() { headless: chromium.headless, ignoreHTTPSErrors: true }); + console.log('puppeteer is launched') const page = await browser.newPage(); + console.log('new page done') await page.setContent(html, {waitUntil: ['load', 'domcontentloaded', 'networkidle0']}) + console.log('content is set') await page.addStyleTag({path: __nccwpck_require__.ab + "pdf.css"}); + console.log('style is set') + const pdf = await page.pdf({ format: 'A4', printBackground: true, diff --git a/src/index.js b/src/index.js index 966b512..506ea49 100644 --- a/src/index.js +++ b/src/index.js @@ -179,10 +179,15 @@ async function generatePdf() { headless: chromium.headless, ignoreHTTPSErrors: true }); + console.log('puppeteer is launched') const page = await browser.newPage(); + console.log('new page done') await page.setContent(html, {waitUntil: ['load', 'domcontentloaded', 'networkidle0']}) + console.log('content is set') await page.addStyleTag({path: __dirname + '/styles/pdf.css'}); + console.log('style is set') + const pdf = await page.pdf({ format: 'A4', printBackground: true,