Last Review: 2014-Aug-26

download package wkhtmltopdf
Download
now!

wkhtmltopdf static build with patched Qt for SolydXK and Debian

2014 August

wkhtmltopdf is a widely used program for converting html input into other formats. Although the SolydXK respectivly Debian repositories are supplying (more or less older versions of) it, advanced users will soon experience some shortages in these versions of the program, 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 maybe 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 is for the ones mentioned in the headline.

For the static build of wkhtmltopdf there were clearly no working binary downloads on the net, so I decided to compile one from the source codes though there seems to exist a package doing the job (see the download section). This page is to offer the latest version to the public. The packages 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.


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.2, like the picture below, this page is useless for you, because you already have, what is offered here...



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)


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. Many Debian based distributions offer 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.

3) Install the wkhtmltox deb package

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

When GDebi Package Installer has finished you should have wkhtmltopdf 0.12.2:

shell shows wkhtmltopdf version 0.12.2
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).