Last Review: 2017-Aug-18

download wkhtmltopdf
Download
now!

wkhtmltopdf static build with patched Qt for Debian based Linux distributions

2014 August, updated 2017 August

wkhtmltopdf is a widely used program for converting html input into other formats. Although the Debian repositories are supplying (more or less older versions of) it, advanced users will soon experience some shortages in these program versions, mainly resulting out of the fact, that it is a dynamically linked one, not containing the Qt patches needed for the advanced features of wkhtmltopdf.

This way maximum compatibility to a wide range of Linux distribution flavours can be achieved without excessive maintaining work, since the static build isn't really independent; it depends on glibc, msttcorefonts, openssl, xserver and some more packages I am not aware of. In other words: The static build of wkhtmltopdf is not suited for every Linux distribution but it should work for the most Debian based distributions. The binaries from 2017 presented here, have been tested with SparkyLinux and SolydXK, both Debian (v.9) based.

For the static build of wkhtmltopdf you hardly find binary downloads on the net, so I decided to compile one from the source codes. The formerly available package wkhtmltox, which seemed to serve the same purpose as my binaries, meanwhile disapperaed from the repositories. This page is to offer the latest versions of wkhtmltopdf and wkhtmltoimage to the public.

The packages version 0.12.2 have been compiled on a Debian 7 machine and tested on SolydX installations with the 32 bit and 64 bit versions, on Debian 7 with the 64 bit version only. These packages will work up to Debian 8 (jessie) based distributions.

The binaries version 0.12.5 have been compiled on a Debian 9 (stretch) machine and tested on SparkyLinux LXDE and SolydX installations with the 64 bit version only. These Linux-generic binaries will do fine with Debian 9 (stretch) based distributions.


How to install wkhtmltopdf static build on SolydXK or Debian in three steps

1) Remove the current wkhtmltopdf program

Normally wkhtmltopdf is not installed with the mentioned distributions. Better be sure not having an installed instance. To do this, you need to execute some shell (terminal window) commands (Please keep in mind, that on Debian the use of sudo is not defaulted, so you must act as root for "sudo commands"). Type the following command into your terminal window to ask for the version of wkhtmltopdf:

wkhtmltopdf -V

Your shell will croak if the program is not installed:

terminal shows wkhtmltopdf not present

If there is an installed version of wkhtmltopdf the reply will show its version. On SolydXK with installed wkhtmltopdf from the repositories you'll get this:



terminal shows wkhtmltopdf version 0.12.0


If the result shows version 0.12.5 respectively version 0.12.2, like the pictures below, this page is useless for you, because you already have, what is offered here...



terminal shows wkhtmltopdf version 0.12.2


terminal shows wkhtmltopdf version 0.12.2

If you must remove an existing wkhtmltopdf installation, type this code into your terminal to get rid of it:

sudo apt-get remove --purge wkhtmltopdf

2) Download the static build binary of wkhtmltopdf (package wkhtmltox)


Works for Debian 9 (Stretch) based distributions.

wkhtmltox 0.12.5 Binary Downloads

Download wkhtmltox 0.12.5 32 Bit Linux generic binary Download wkhtmltox 0.12.5 64 Bit Linux generic binary
Download
wkhtmltox-0.12.5
32 Bit Linux generic binary
 Download
wkhtmltox-0.12.5
64 Bit Linux generic binary

wkhtmltox is open source (LGPL).

While these downloads deliver the complete result of the compiler run (which is a tarball), suggested by the project itself, usually there is only one file needed to get the program running, as described later on this page.

Works for Debian 7 (Wheezy) and 8 (Jessie) based distributions (and maybe older ones).

wkhtmltopdf 0.12.2 Binary Downloads

Download wkhtmltopdf 0.12.2 32 Bit deb package Download wkhtmltopdf 0.12.2 64 Bit deb package
Download
wkhtmltopdf-0.12.2
32 Bit deb package
 Download
wkhtmltopdf-0.12.2
64 Bit deb package

wkhtmltopdf is open source (LGPL).

Please note that the deb packages are named wkhtmltox_xxx while the desired program is wkhtmltopdf. The package wkhtmltox is so to say a replacement for the wkhtmltopdf package, the different names reflect the use of different Webkit versions. Some distributions offer(ed) the wkhtmltox package within their repositories. My downloads are named wkhtmltopdf_xxx to support corresponding searches and leave no doubt left what they are made for.

3a) Install wkhtmltopdf Linux generic binaries (wkhtmltox 0.12.5)

First you have to unpack the downloaded tarball, which most conveniently can be done with the Xarchiver program. The result will be a folder named wkhtmltox. To get the program running, execute this code on the command line (comment lines appear greyed; you must be root, if sudo is not enabled):

#
# Copy executables to the appropriate location:
cd wkhtmltox
cd bin
sudo cp * /usr/bin

3b) Install wkhtmltopdf deb packages (wkhtmltox 0.12.2)

A convenient way to install deb packages is the use of the graphical GDebi Package Installer. Of course you can do "sudo dpkg -i DEB-PACKAGE-NAME" but GDebi gives you plenty of informations at the same time before executing any installation, what is very useful, if you got packages not arriving from a repository.

Open your File Manager and do a right click on the wkhtmltox-0.12.2-7058a04_linux-wheezy_xxx.deb package file. Choose Open with "GDebi Package Installer" and click the Install Package button.

GDebi Package Installer loaded with wkhtmltox
GDebi Package Installer loaded with package wkhtmltox
HINT:
If, after installing, your machine claims, that there is no wkhtmltopdf in the /usr/bin/ directory (the program is located in /usr/local/bin), simply restart and wkhtmltopdf turns available.

Up to now I didn't experience such an installation behaviour, but while testing these deb packages it occured two times (Not on my production machine and in that case I am uncertain about what I really did, because I played very much with non functional wkhtmltopdf/wkhtmltox stuff before installing my compiled version). Maybe the difference between package and program names requires the operating system to rescan for executables (dpkg immediatly knows about the new install of wkhtmltox).