Odoo Warning - Wkhtmltopdf failed (error code: -11).

Learn what to do when the Wkhtmltopdf error is coming

This tutorial is going to show you how to fix "Odoo warning - Wkhtmltopdf failed" error. Whtmltopdf is required to print reports in pdf. If you don't have it installed in older Odoo versions you will get an error as in the title, in newer versions the reports will be displayed in HTML format.

Prepare yourself and Odoo

Start from backing up your server. If you will install the wrong dependency it might be very hard to fix it.

Visit the Odoo documentation and check what is the Wkhtmltopdf recommended version for your Odoo (https://www.odoo.com/documentation/9.0/setup/install.html)

Odoo • Text and Image
Odoo • Image and Text
Log in to your system and install the dependency

Sample execution(For Ubuntu 16,04):

cd ~
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 
wkhtmltopdf --version

The last line will tell you what is the version installed. Remember to restart the server(not only the Odoo) to apply the changes.

Check if the pdf reports are printing

Log in to Odoo and check if everything prints ok.

If it does not work the first time don't panic. Try to restart Odoo and restart the server again.

Odoo • Text and Image
Odoo • Image and Text

Check also...

Errors  -11 and -6 may also be caused by Odoo setup. If it happens please check the Odoo config file and add more memory to limit_memory_hard.




Better ask twice than do a mistake If you are not sure use Odoo Forum or AskUbuntu forum to get your questions answered..