Making WkHTMLtoPDF work on Linux

It’s really easy and simple to use. It works well on Windows operating systems.

But currently, the linux downloadable available on the website in missing a lot of needed libraries.

Here are the ones needed if you want to install it on a RedHat/CentOS/Amazon AWS instance:

– fontconfig-32bit-2.11.1-4.1.x86_64.rpm

– libjpeg62-32bit-62.1.0-35.1.x86_64.rpm

– libpng12-0-32bit-1.2.52-2.1.x86_64.rpm

– libstdc++6-32bit-4.7.2_20130108-2.1.6.x86_64.rpm

– libXext6-32bit-1.3.3-3.1.x86_64.rpm

– wkhtmltox-0.12.2.1_linux-centos6-i386.rpm

– xorg-x11-libXrender-32bit-7.6_0.9.6-9.1.2.x86_64.rpm

To install each of them, just type :

sudo yum install <nameOfTheLibrary>

in the terminal

If you need other versions (like 64 bits one) of some libraries you can find them all on http://www.rpmfind.net . Just take into account that you have better chances to find them thanks to Google than with the search engine of their website.

I wrote this post because I took an awful lot of time figuring that out, and I thought it would be useful.