Images do not appear in header and footer of HTML2PDF output

Question:
I am unable to add an image, either remote (https) nor local (file) from the footer or header template. How can I add an image?

Answer:
If you search for headerTemplate on this site you can see the options for headers and footers.

As for images, while its not clear from above, Chromium has extra restrictions on the header/footer templates. In particular remote resources cannot be loaded.

Instead, you can Base64 encode your image file as described above.

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:APIs:Forums: