I installed Erpnext with a bitnami instence, but Wkhtmltopdf was apparently not inclued.
I followed this Odoo packaged by Bitnami to install the patched version, And now I get this when I want to get a PDF version of a quote:
Traceback (innermost last):
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/app.py", line 63, in application
response = frappe.api.handle()
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/api.py", line 50, in handle
return frappe.handler.handle()
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py", line 20, in handle
execute_cmd(cmd)
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/handler.py", line 37, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/__init__.py", line 801, in call
return fn(*args, **newargs)
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 150, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 119, in to_pdf
raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, stderr.decode("utf-8")))
IOError: wkhtmltopdf exited with non-zero code 1. error:
--no-outline specified in incorrect location
I first tried to install the depedencies with apt-get, and erpnext was complaining to the fact the package was not patched.
Traceback (innermost last):
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/app.py", line 60, in application
response = frappe.api.handle()
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/api.py", line 50, in handle
return frappe.handler.handle()
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
execute_cmd(cmd)
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 806, in call
return fn(*args, **newargs)
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 182, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/erpnext/erpnext/test-frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/erpnext/erpnext/test-frappe/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/erpnext/erpnext/test-frappe/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 119, in to_pdf
raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, stderr.decode("utf-8")))
IOError: wkhtmltopdf exited with non-zero code 1. error:
--no-outline specified in incorrect location
Name:
wkhtmltopdf 0.12.2.1 (with patched qt)
Synopsis:
wkhtmltopdf [GLOBAL OPTION]... [OBJECT]...
Here, replace “trusty” with your OS name and if 64 bit only then keep “amd64” like that , otherwise change it to “i386” and down load the deb file.
After that execute the following commands,
cd ~/Downloads
sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb
Now, check wkhtmltopdf version with below command,
Just wanted to find out what is the latest version of wkhtmltopdf, i currently have version 0.12.4 installed on my machine, shall i replace with a latter version??