Unable to install wkhtmltopdf with patched qt in ubuntu 16.04

pdf-generationpython-2.7wkhtmltopdf

wkhtmltopdf with patched qt pkg is not available for ubuntu 16.04 .so i am install 14.04 pkg which is install without patched qt but it need it with patched qt. I also tried with static version but it give some compilation
error

Best Answer

The patched version of wkhtmltopdf is not present in the Ubuntu repository. You can download it from the project website if you want. But they still don't have a .deb file for Xenial Xerus, so you need to download the binary file and install the dependencies (libxrender1 fontconfig xvfb) manually.

Here is a script that installs the patched version from the project website:

sudo apt-get update
sudo apt-get install libxrender1 fontconfig xvfb
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz -P /tmp/
cd /opt/
sudo tar xf /tmp/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
sudo ln -s /opt/wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf

Edit [16/06/2017]: wkhtmltopdf releases were moved to GitHub due to instability of their servers. I've updated my answer to provide the right path to download the latest release.