M BUZZ CRAZE NEWS
// news

How can I install the latest wkhtmltopdf on Ubuntu 16.04?

By Jessica Wood

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?

3 Answers

Steps to install wkhtmltopdf 0.12.3 on Ubuntu 16.04.

Log in as root, then:

cd ~
wget
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.

7
$ sudo apt-get install wget
$ mkdir wkhtmltopdf-download
$ cd wkhtmltopdf-download
wkhtmltopdf-download $ wget
wkhtmltopdf-download $ tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
wkhtmltopdf-download $ cd wkhtmltox/bin

Then just move the binaries somewhere in your PATH. See

$ echo $PATH

For me, it was mv * /home/math/bin. And finally:

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

As of this moment, when you try to install wkhtmltopdf from the Ubuntu's repositories, it will install the version 0.12.4.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy