Install wkhtmltopdf on cPanel or CentOS

install wkhtmltopdf
install wkhtmltopdf

Install wkhtmltopdf on cPanel or CentOS

Check out this post to Install wkhtmltopdf on cPanel or CentOS machine. wkhtmltopdf is a tool used to render HTML into PDF. Please check the steps to install wkhtmltopdf below:

Step 1:

Install dependencies:

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

Step 2:

There are two methods to install wkhtmltopdf on CentOS or cPanel. Install it using any of your desired methods.

Method 1: Using Source file

Download the tarball from here, depends on the architecture and OS type. I am downloading the tarball for 64 bit Linux systems.

cd /usr/local/src/
tar xvfJ wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
cp -r wkhtmltox/bin/wkhtmltopdf /usr/bin/
cp -r wkhtmltox/bin/wkhtmltoimage /usr/bin/

Then run:

wkhtmltopdf -V

Method 2: Using RPM

The rpm file is not available on the latest version of wkhtmltopdf. I am explaining the installation of wkhtmltopdf for 64 bit CentOS 7. Click on the green button to download the rpm depends on the architecture and CentOS version: Download

rpm -Uvh wkhtmltox-

Create symlinks if the wkhtmltopdf binaries are not in /usr/bin directory.

ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
ln -s /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage

Check the version using the following command:

wkhtmltopdf -V

Step 3:

Verify the installation:

wkhtmltopdf grepitout.pdf

The PDF file will be created. That’s it!

If you like this post and wish to receive more articles from us, please like our FB page: Grepitout

Your suggestions and feedbacks will encourage us and help to improve further, please feel free to write your comments.

For more details on our services, please drop us an E-mail at