Odoo 12 — Install wkhtmltopdf

Resolve Odoo 12 error: “Unable to find Wkhtmltopdf on this system. The report will be shown in html”. Let’s see in this article how to solve.

Let’s check which version is currently installed, with the following command:

wkhtmltopdf --version

if it is not installed, you will have:

Command 'wkhtmltopdf' not found, but can be installed with:
sudo apt install wkhtmltopdf

if it is installed verify that the version is 0.12.5. If the version is not correct give the command (this in Debian/Ubuntu system):

sudo apt-get remove --purge wkhtmltopdf

Let’s see how to install wkhtmltopdf:

wget "https://github.com/wkhtmltopdf/wkhtmltopdf/releases"\
"/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb" \
-O /tmp/wkhtml.deb

you will have the following output:

Now run the command:

sudo dpkg -i /tmp/wkhtml.deb

It is possible that dependencies are missing to install the library. As in this case:

This problem can be solved with:

sudo apt-get -f install

After this process you will no longer have the error, neither in the logs, nor when you try to generate a pdf report. Now wkhtmltopdf version is:

--

--

Gioacchino Lonardo

Computer Engineer, AI enthusiast, biker, guitar&bass player