PDF Email Problems Thread

Same issue here,

tried with some of the propossed solutions but did not work

Any suggestion

Thank you

this is weird, i followed all the available solutions, but i can’t seem to solve it.

I’m using Google cloud service. So the IP address that I put in should be the ip address of eth0 right?

I’ve tried inputting the public IP address of the server to no avail.

1 Like

Just put http://localhost,

Hi All,
I have DNS based multi-tenant setup which is also experiencing issue with PDF view / email attachment images missing and layout not correct, however on one site it works correctly?

Below are site config files - note the working site does not contain the “host_name” : “” and is not the site in the currentsite.txt file.

  • The “host_name” configuration has been tested in a combination of the accessible URL / localhost / local IP / public IP and also with http / https - no success in any. Bench restarts also performed after each.
  • Newly created site’s have the issue.
  • Nothing in browser dev console indicating issue.
  • File permissions on image files are the same across all sites - Owner/Group ‘frappe’ with 644.
  • Frappe 7.0.30 and ERPNext 7.0.34
  • Standard or custom print format has issue

Are there others experiencing this using DNS based multi-tenant setup? Any assistance would be greatly appreciated.

Working Site
{ "db_name": "-----", "db_password": "-----", "developer_mode": 1, "limits": { "space_usage": { "backup_size": 26.0, "database_size": 107.95, "files_size": 11.0, "total": 144.95 } }, "ssl_certificate": "/etc/letsencrypt/live/-----/fullchain.pem", "ssl_certificate_key": "/etc/letsencrypt/live/-----/privkey.pem" }

Site Not Working
{ "db_name": "------", "db_password": "------", "developer_mode": 1, "encryption_key": "-------", "limits": { "space_usage": { "backup_size": 6.0, "database_size": 10.02, "files_size": 3.0, "total": 19.02 } }, "ssl_certificate": "/etc/letsencrypt/live/-------/fullchain.pem", "ssl_certificate_key": "/etc/letsencrypt/live/-------/privkey.pem" }

Another Site Not Working
{ "db_name": "-----", "db_password": "-----", "ssl_certificate": "/etc/letsencrypt/live/-----/fullchain.pem", "ssl_certificate_key": "/etc/letsencrypt/live/-----/privkey.pem" }

I updated my ERPNEXT to the lastest version, 7.1.0… and voila! it works!

Can Frappe team confirm if there have been improvements in this area? Noted prior discussion on switching to jphantom - Replace wkhtmltopdf to phantomjs? - cannot see it as an enhancement against v7.1 though…

Unfortunately cannot simply upgrade given it is not stable release. Hopefully when the time comes it will resolve.

HI,
I am still stack. Here is my .json file. What I missed please let me know.
{
“db_name”: “secret”,
“db_password”: “secret”,
“developer_mode”: 1,
“host_name”: “http://my.host.name
}

Hi,
Even after changing the json files with the above said addition of
“host_name”:“http://localhost:8080”, the pdf is losing its formatting when sending it via mail.
Is there any other solution?

Thanks and regards
Ajit

pls try on “host_name”:“http://localhost:80

1 Like

Hi,
Thanks, the formatting of the PDF is retained, but the font styles are lost.

this works fine on VM hosted
thanks.

I also have same issue after upgrading v8
I tried this solution but failed

recently updated to the latest version, and i am losing the formatting in pdf even after adding "host_name" : "http://localhost:80", to the sites_config.json.

If i remove the above line, the PDF gets timed-out.

@helpdesk
could you please help me regarding the pdf issue above.!

Awaiting your response.

Thanks

Hi Ajit,

Please rename the “localhost” with the system name .

hi,

Still no change

observe the screenshot attached - the images are lost

PDF version

actual version what is expected

My site_config.json file

I don’t think it’s a good idea to publish you db passwd on the web!

I’m not sure but your hostname is specified with the https prefix, shouldn’t the port be 443 in that case?

@Bas_de_Reus Thanks for letting me know about the password.

I corrected the https prefix, still no change in pdf output

Ok weird thing.
But the PDF problem does not actually seem to be a problem.

When clicking on PDF in the print view, it gets timed out and doesnt open the pdf page, but the same thing if it is directly sent as a mail, gets delivered with the proper format.

Not sure if I should raise this as an issue or not.!

Hi @ajit.jain1,

I have seen such issues before for two reasons:

  • Not enough server memory available
  • Missing images (for example after a change from public to private)

In both cases the PDF was generated when sent via email but not directly in the browser.

After correction of the underlying issue, I have not encountered any further problem.

Maybe that can help you.

2 Likes