I’ve recently installed v12 in a local server. Everything seems fine [so far], but I’m having trouble generating PDF prints. The PDF format is broken while the preview works just fine.
Same problem, fixed after.
1.- installing libssl1.0-dev (sudo apt-get install -y libssl1.0-dev)
2.- Adding hostname in site_config.json ( “host_name”: “https://www.yourdomain.com",) in my case , no need to add port, because i already have “nginx_port”: 8001 in site_config.json file
I am having trouble with the generating pdf in k8s production environment.
The official docker-compose setup run ok though.
Can someone give me some pointer on how to fix the 504 time out error of generating pdf in k8s ?
I have also tried to install libssl-dev apt-get update & apt-get install libssl-dev
and disable all the letter head to make sure that there is no private image but also no luck
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 68, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 45, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1574, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/print_format.py", line 129, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 38, in get_pdf
filedata = pdfkit.from_string(html, options=options or {}, verbose=True)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pdfkit/api.py", line 75, in from_string
return r.to_pdf(output_path)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pdfkit/pdfkit.py", line 201, in to_pdf
self.handle_error(exit_code, stderr)
File "/home/frappe/frappe-bench/env/lib/python3.10/site-packages/pdfkit/pdfkit.py", line 155, in handle_error
raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: TimeoutError
I am having the same issue, have added the hostname in the site config file but have had no luck, I added the IP Address but no luck, I tried to install libssl1.0 but have had no luck.
I have done this on ERPNext 14 and 15
All below I have tried but still, I can’t get it right.