I was recently upgrading a server and I came across a problem that does not seem well documented on the internet. I have a CentOS 64bit Server running the latest version of WHM/cpanel. A client needed wkhtmltopdf installed for one of his websites so I thought I would show you how to install it on CentOS.
You can download wkhtmltopdf from this website: http://code.google.com/p/wkhtmltopdf/downloads/list
The first time I tried to install this I went with the latest version. At the time of writing this it was wkhtmltoimage-0.11.0_rc1 Linux Static Binary (amd64). However all I got when I tried to write a pdf was:
This turned out to be because it was not a stable release so do not make the same mistake I made and download the latest release candidate. Rather download the stable version. At the time of writing this, the latest version is 0.99.
http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
The following commands should get wkhtmltopdf working on cPanel server:
You can download wkhtmltopdf from this website: http://code.google.com/p/wkhtmltopdf/downloads/list
The first time I tried to install this I went with the latest version. At the time of writing this it was wkhtmltoimage-0.11.0_rc1 Linux Static Binary (amd64). However all I got when I tried to write a pdf was:
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
QPixmap: Cannot create a QPixmap when no GUI is being used
Segmentation fault
This turned out to be because it was not a stable release so do not make the same mistake I made and download the latest release candidate. Rather download the stable version. At the time of writing this, the latest version is 0.99.
http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2
The following commands should get wkhtmltopdf working on cPanel server:
# 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/bin/wkhtmltopdf
#chmod 777 /usr/bin/wkhtmltopdf
To test wkhtmltopdf run the following command:
# whktmltopdf http://www.google.com google.pdf
You should see a file in your directory called google.pdf.
Hope this helped you save time.










Sandile
mongezi
thulani Ndlovu
Freddy Tshikala
Zwelo Masilela
Moses Mathere
Lindiwe Mazibuko
Thabiso Markz
Mhizana
SV
Marcell
dayjoyskills
vuyo fanta
Hiro Ndakumura
@sthemabanga
darlington ndebele
Ntsika
colman
Sthembiso Mkhize