How to Install wkhtmltopdf in Linux

Installation of wkhtmltopdf in CentOS/RedHat/Fedora

Step 1: Pre-Requisites

# yum install -y xorg-x11-fonts-75dpi
# yum install -y xorg-x11-fonts-Type1

For 64bits OS

# wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos6-amd64.rpm

For 32bits OS

# wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.2.1/wkhtmltox-0.12.2.1_linux-centos6-i386.rpm

Step 1: Pre-Requisites

After the file has been downloaded, run the command:

For 64bits OS

# rpm -Uvh wkhtmltox-0.12.2.1_linux-centos6-amd64.rpm

For 32bits OS

# rpm -Uvh wkhtmltox-0.12.2.1_linux-centos6-i386.rpm

Installation of wkhtmltopdf in Debian/Ubuntu

Step 1: Pre-Requisites

First we have to install the necessary libraries in order to install wkhtmltopdf package.

# sudo aptitude install openssl build-essential xorg libssl-dev

For 64bits OS

# wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
# tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2
# mv wkhtmltopdf-amd64 /usr/local/bin/wkhtmltopdf
# chmod +x /usr/local/bin/wkhtmltopdf

For 32bits OS

# wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz2
# tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2
# mv wkhtmltopdf-i386 /usr/local/bin/wkhtmltopdf
# chmod +x /usr/local/bin/wkhtmltopdf
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *