0👍
You should wait until the content of the page is loaded before running pdf
.
I recommend the domcontentloaded
option.
const HTML = `${HTML_CONTENT}`
await page.setContent(HTML,
{
waitUntil: "domcontentloaded",
},
)
For more options check de docs.
https://pptr.dev/api/puppeteer.page.setcontent
- Chartjs-Hide data labels chart.js and draw/mark y = 0 with thicker line
- Chartjs-Gradient bar charts with react & chart.js
Source:stackexchange.com