Has anyone been able to figure out how to display images in PDFs ? My intention is to have images displayed in the letterhead of sales invoices.
I have tried every little solution on this forum, on version 13 nothing works.
Your assistance will be greatly appreciated.
@Iulian_Olaru does your images appear as small grey line ?
No, when printing the PDF, the image doesn’t appear at all.
I’ve tried with adding the hostname in the site_config.json, I’ve tried with having an external url for the image, I’ve tried everything I’ve found on this forum from other people having the same issue.
Troubleshooting wkhtmltopdf is a nightmare. That’s a major part of the reason, I believe, that v14 switches over to weasyprint. The only advice I can give is to find a way to get the problematic html saved as a file, then try running wkhtmltopdf manually from the command line. This will at least show you the errors.
So I think I found a workaround, it seems when you use the Print function, actually you can save as PDF and that looks proper as it should.
This is the only work around I could find.
Yeah, great if that works for you. It’s a matter of who handles the rendering. With “Print”, it’s your browser, and with “PDF”, it’s wkhtmltopdf.
FYI, if you ever want to attach documents to an email sent from a doc form, you’ll have to do it manually. The “Attach document” feature uses wkhtmltopdf as well.
Thanks Peter, you’re amazing!