After installing Let’s Encrypt, Pdf is not working correctly. Everything is left aligned and images are not displaying. Same thing is also happening in the email attachment.
Added “host_name”: “https://erp.domain.com” in site_config.json, but no luck. Can anyone please help!
I don’t know if this answer helps,
when you use HTTPS make sure that all links to your website are HTTPS, so for example if your calling an image for your PDF in https://erp.domain.com and your image is http://erp.domain.com/somewhere/image.png or any other type of resources, that will mark the website as a HTTP, so make sure you use HTTPS everywhere
one of the ways to do that is to automatically redirect all HTTP requests to HTTPS
Other cause might be that your images are not public
Other cause might be that your actual host name does not match the host name you added in site_config.json
, check whats ur host name hostname --fqdn
Image is actually loading on HTTPS and it is public.
This might be the case. But as far as I found one server can have one hostname. I might be wrong, but here I found similar answer. However, I added hostname in /etc/hosts, but didn’t change anything.
have you checked if the ssl-module required for https-connections of wkhtmltopdf is available? There is an easy test for this: create a simple html file, which includes an image from an https source, e.g. something like