Home / CONTROL PANELS / cPanel / Install wkhtmltopdf on cPanel or CentOS

Install wkhtmltopdf on cPanel or CentOS

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 method.

Method 1: Using Source file

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

cd /usr/local/src/
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.3/wkhtmltox-0.12.3_linux-generic-amd64.tar.xz
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

wget http://download.gna.org/wkhtmltopdf/0.12/
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 http://grepitout.com/install-wkhtmltopdf-cpanel-centos/ 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 info@grepitout.com

Check Also

Clear VirtFS

How to Clear VirtFS on cPanel Server

How to Clear VirtFS on cPanel Server This post explains the methods to clear VirtFS ...

Leave a Reply

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