wkhtmltopdf = Simple shell utility to convert html to pdf using the webkit rendering engine, and qt.

wkhtmltoimage = Converts html to image, uses same webkit rendering engine , and qt.

Below steps has been tested on Cent OS 5.x and 6.x series.

  • Make sure you have GIT installed, if not then refer

Installation path = /root/wkhtmltopdf/bin

  • cp /root/wkhtmltopdf/bin/ /usr/local/lib
  • echo “/usr/local/lib” >> /etc/
  • /sbin/ldconfig

Checking the Installation

[root@bt]#  /root/wkhtmltopdf/bin/./wkhtmltopdf google.pdf

Loading pages (1/6)
Counting pages (2/6)
Loading TOC (3/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)

[root@bt]# /root/wkhtmltopdf/bin/./wkhtmltoimage google.jpg

Loading page (1/2)
Rendering (2/2)

Try to open the above created Image and pdf file and you will see the google page.

PS: Kindly let us know any issue with above article and we will update it.