Skip to content

Common pitfalls

Here are the most common issues the support team has seen so far.

If this page does not solve your issue, support is still available by chat or email.

1. HTML format

If you are not using a URL and instead use setContent.html, remember to base64-encode your HTML.

2. The waitUntil option

Is your content missing or still loading when the render starts?

Adjust the waitUntil property. You can use it with both goto and setContent. Common values include networkidle0, networkidle2, domcontentloaded, and load.

      "options": {
        "waitUntil": ["networkidle0"] // <===
      }

3. The printBackground property (PDF only)

If your PDF looks off, try setting "printBackground": true.

This usually makes the PDF look closer to what you see in the browser.

4. PDF headers and footers

This part is often the trickiest.

When adding headers or footers, use the "displayHeaderFooter": true property. The headerTemplate and footerTemplate fields expect base64-encoded HTML.

The main caveat is that styles inside these sections do not inherit from the page itself. If you cannot see them, the text may simply be too small or rendered as white text on a white background.

Add explicit styles to make them visible.

All rights reserved