Hi,
I'm trying to display an image on my header when printing to PDF with Pupeteer, but I am unable to do it. I'm not an expert on css by any means, so I'm struggling to use the info I find here and there. The info in #1028 was superuseful to get my footer, that has only text, but I can't load an image in the header. I know that pupeteer blocks loading images from the internet, so I need to use a base64 encoded image, but still it doesn't load.
I would like to store the base64 garbage in the css file, if possible, instead of the markdown file, to reduce the clutter.
So far, the best candidate for a solution is this one but I can't make it work.
Any ideas?
I tried to make an example.
https://github.com/tmori3y2/mpe-puppeteer-header-footer-example
Thanks for replying and taking the time to write an example!
I managed to get it working with your help. I understand that the limitation of having to encode the image comes from puppeteer, and that's quite annoying, but at least is something. Using an svg I managed to reduce the image size to 800B, which is quite good.
Thanks!
Most helpful comment
I tried to make an example.
https://github.com/tmori3y2/mpe-puppeteer-header-footer-example