ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Steps to install wkhtmltopdf with patched Qt (version 0.12.3) (for pdf generation)

wkhtmltopdf
installation

#1

On click of PDF button on report you receive error

IOError: No wkhtmltopdf executable found: “”

My environment is Ubuntu. I followed below steps to make it work

$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
$ tar vxf wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
$ sudo cp wkhtmltox/bin/wk* /usr/bin/

And you can confirm with:

$ wkhtmltopdf --version
wkhtmltopdf 0.12.3 (with patched qt)

Note normal $ sudo apt-get install wkhtmltopdf installs wkhtmltopdf 0.12.2.4 and ERPNext has requirement for wkhtmltopdf with patched Qt (version 0.12.3)
Sharing this, might be useful to others for installation. Thanks


smtplib.SMTPDataError: (501, b'Syntax error - line too long')
#2

PDF generation does not work here, no matter if with or without a letterhead… We get a nginx timeout.

We are using wkhtmltopdf 0.12.4 (with patched qt) - as recommended in https://www.howtoforge.com/tutorial/how-to-install-erpnext-on-debian/ on Debian jessie with bench --version 4.1.0.

How could we further debug this? ERPnext log does not show anything.


#3

“We get a nginx timeout.”

This indicates a network connectivity failure.

A log should confirm this with a traceback.

One test is that wkhtmltopdf runs on the command line.
edit: for eg Wkhtmltopdf failing

You give bench version, but what erpnext and frappe version?

What have you found or tried to debug your case?

Here’s are lengthy threads with what to try



#4

@rasos Make sure, that wkhtml can access the urls given in the html files. If the server can’t access it’s own IP adress it wont work hint


#5

Thanks @epe - putting the erp domain names in /etc/hosts did the trick!


#6