Introduction:

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

https://ustechnica.wordpress.com/2012/09/17/two-step-authentication-with-google-authenticator/

Installation path = /root/wkhtmltopdf/bin

  • cp /root/wkhtmltopdf/bin/libwkhtmltox.so.0.10.0 /usr/local/lib
  • echo “/usr/local/lib” >> /etc/ld.so.conf
  • /sbin/ldconfig

Checking the Installation

[root@bt]#  /root/wkhtmltopdf/bin/./wkhtmltopdf http://www.google.com 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)
Done

[root@bt]# /root/wkhtmltopdf/bin/./wkhtmltoimage http://www.google.com google.jpg

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

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.