Install wkhtmltopdf On CentOS 6.5

Note: A newer version of this tutorial has been created: UPDATE: Install wkhtmltopdf on CentOS 6.5. In a previous tutorial I had a very simple way to install WKHTMLToPDF on Centos 6. But today, a developer was telling me it wasn’t working.In debugging, the dev asked me if `/usr/bin/wkhtmltopdf` was the correct path to the file, which I replied it was. So they debugged some more, and finally ran out of reasons why their PDF would not create. So I took a look and ran:
/usr/bin/wkhtmltopdf
Instead of getting the normal:
You need to specify atleast one input file, and exactly one output file
Use - for stdin or stdout

Name:
wkhtmltopdf 0.12.0 03c001de254b857f08eba80b62d4b6490ffed41d

Synopsis:
wkhtmltopdf [GLOBAL OPTION]... [OBJECT]...

Document objects:
...
I got zilch! Nada! Nothing!Perms all looked good. I then decided to re-install. Here’s what I did.
# su -
# wget http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.0/wkhtmltox-linux-amd64_0.12.0-03c001d.tar.xz
# tar xf wkhtmltox-linux-amd64_0.12.0-03c001d.tar.xz
# cd wkhtmltox/bin
# cp wkhtmltopdf /usr/bin
# cp wkhtmltoimage /usr/bin
From there the command ran as expected and the developers were all set.

Comments

comments

Posted in Linux Tagged with: ,