Install wkhtmltopdf 0.12.4 on CentOS 6.x and 7.x

Install dependencies (if needed)

$ yum install -y xorg-x11-fonts-75dpi
$ yum install -y xorg-x11-fonts-Type1
$ yum install xz

Get latest version of wkhtmltopdf (replace version number if needed)

$ wget

Untar and move wkhtmltox

$ unxz wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
$ tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar
$ mv wkhtmltox /usr/bin/wkhtmltox

Add wkhtmltopdf to .bash_profile (optional)

nano .bash_profile

Add the following line at the end of the .bash_profile file
export PATH=/usr/bin/wkhtmltox/bin:$PATH

And don’t forget..

$ rm wkhtmltox-0.12.4_linux-generic-amd64.tar

Finally enjoy!

$ wkhtmltopdf google.pdf