Skip to content

Common pitfalls

Hi fellow developers, here are the most common mistakes the support team has seen so far.

We hope this helps. Please know we remain available via email or chat 🙏

1. The HTML format :

If you're not using a URL and instead use setContent.html, remember to encode your HTML as base64.

2. The waitUntil option :

Is your data not appearing or not loading?

Adjust the waitUntil property. You can find this property in goto and setContent. It can have values like networkidle0, networkidle2, domcontentloaded, and load.

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

3. The printBackground Property (PDF only) :

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

This usually helps the PDF appear as you'd expect.

4. PDF headers and footers :

This is tricky.

When adding headers or footers, use the "displayHeaderFooter": true property. But where are they, you ask? The headerTemplate and footerTemplate require HTML (base64 encoded).

The catch is that the styling within these sections doesn't inherit from the main page. If you can't see them, they might have a white font on a white background, and the font might be tiny.

Add some style to make them visible.

All rights reserved