I am facing a 500 Internal Server Error when trying to generate PDF output for a Print Designer print format in ERPNext v15.
Environment Details
-
ERPNext Version: v15
-
Frappe Version: v15 (bundled with ERPNext)
-
Deployment: VPS (Ubuntu 24.04)
-
Web Server: Nginx 1.24.0
-
PDF Engine: wkhtmltopdf (installed and working for other formats)
Error Details
When clicking Print for a sales invoice or purchase invoice item I face the below errors, the following request fails:
During PDF generation for Print Designer formats, the browser requests images using port 8000, for example:
https://erpvps.desaitechindia.com:8000/public/files/desaitechlogo.jpg https://erpvps.desaitechindia.com:8000/files/signature.png
The same images are accessible without port 8000, for example:
https://erpvps.desaitechindia.com/public/files/desaitechlogo.jpg https://erpvps.desaitechindia.com/files/signature.png
This behavior is observed only during PDF generation for Print Designer formats.
HTML preview and Jinja/HTML print formats do not show this issue.
The error occurs only for Print Designer formats.
What I Have Already Tried
-
Restarted bench and services
-
Verified wkhtmltopdf installation
-
Cleared cache and rebuilt assets
-
Tested multiple Print Designer formats
-
Confirmed file and image URLs are accessible
None of the above resolved the issue.
Try to add “host_name”: “https://erpvps.desaitechindia.com:8000” as key:value to sites/<site_name>/site_config.json
1 Like