Reputation: 893
wkhtmltopdf 0.11.0 and earlier install simply copying linux static binary file to web server as here https://stackoverflow.com/a/3116571/2464199
and run it via PHP command like
exec('/path/to/wkhtmltopdf-amd64 file.html file.php');
In newer versions wkhtmltopdf (0.12.0 and later) no static binary file.
How can I install it now on shared hosting account without root access?
OS on web server:
Linux multidomain1.hostsila.com 2.6.18-274.el5 #1 SMP Fri Jul 22 04:43:29 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Linux version 2.6.18-274.el5 ([email protected]) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50)) #1 SMP Fri Jul 22 04:43:29 EDT 2011
CentOS release 5.10 (Final)
Upvotes: 3
Views: 4467
Reputation: 792
If you see the official binaries for 0.12.1, they are actually RPMs. If you do not have root access on the server, you can simply run the following command to extract the RPM contents:
rpm2cpio wkhtmltox-0.12.1_linux-centos5-amd64.rpm | cpio -idmv
You should get the binaries in the usr/local/bin
subfolder, which you can then copy to any location that you want.
Please note that you may need to ask the host to install the dependent packages (fontconfig freetype libpng zlib libjpeg openssl libX11 libXext libXrender libstdc++ glibc
) if they are not already installed.
Upvotes: 4