PDF generating error

i have a problem with pdf generating:

Traceback (innermost last):
File “/home/gestionale/frappe-bench/apps/frappe/frappe/app.py”, line 54, in application
response = frappe.api.handle()
File “/home/gestionale/frappe-bench/apps/frappe/frappe/api.py”, line 50, in handle
return frappe.handler.handle()
File “/home/gestionale/frappe-bench/apps/frappe/frappe/handler.py”, line 69, in handle
File “/home/gestionale/frappe-bench/apps/frappe/frappe/handler.py”, line 92, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/gestionale/frappe-bench/apps/frappe/frappe/init.py”, line 751, in call
return fn(*args, **newargs)
File “/home/gestionale/frappe-bench/apps/frappe/frappe/templates/pages/print.py”, line 115, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “/home/gestionale/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 30, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/gestionale/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/gestionale/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py”, line 93, in to_pdf
File “/usr/lib/python2.7/subprocess.py”, line 710, in init
errread, errwrite)
File “/usr/lib/python2.7/subprocess.py”, line 1335, in _execute_child
raise child_exception
OSError: [Errno 8] Exec format error

Have you any idea?

Hi @mauroti

Is wkhtmltopdf installed in your system?

If you used the setup_frappe.sh file to install, it should’ve been installed by that script.


i have solved by copying code from suggested script…

wget wkhtmltopdf - Browse Files at SourceForge.net
sudo dpkg -i wkhtmltox-

I have installed ERPNEXT from this script but wkhtmltopdf not work:


Did you get the message: "Unsupported Distribution” while installing erpnext using the setup_frappe script?

I have not noticed… sorry!