How To Install wkhtmltopdf PHP Bindings
This isn’t a difficult process, but I’m sure I’ll need it again, so here it is.
- Download the latest version of libwkhtmltox and the source of wkhtmltopdf from google code
- Copy lib/libwkhtmltox.so from libwkhtmltox to /usr/local/lib
- Copy include/wkhtmltox from wkhtmltopdf to /usr/local/include
$ldconfig -v | grep wkhtml(just to make sure it’s loaded)
- Grab php-wkhtmltox from github
If development tools aren’t installed:
$apt-get install build-essential php5-dev (ubuntu)
extension=phpwkhtmltox.so to php.ini.
P.S. These instructions are for Ubuntu. If you’re on centOS, things are more difficult, good luck.