Ubuntu – How to install the latest wkhtmltopdf on Ubuntu 16.04

16.04wkhtmltopdf

Currently (25.09.2017)

$ sudo apt-get install wkhtmltopdf

installs wkhtmltopdf 0.12.2.4, but the website shows that we have version 0.12.4 already.

How can I install the latest version of wkhtmltopdf on Ubuntu 16.04?

Best Answer

Steps to install wkhtmltopdf 0.12.3 on Ubuntu 16.04.

Log in as root, then:

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 
cp wkhtmltox/bin/wk* /usr/local/bin/

And you can confirm with:

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

By the way, I chose 0.12.3 instead of 0.12.4 because of a strange page sizing issue, discussed on the wkhtmltopdf GitHub.