Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install wkhtmltopdf on a linux based (shared hosting) web server

I have tried in all ways to get wkhtmltopdf installed on our web server but unfortunately it is not getting installed. I cannot access user/bin folder as stated in a tutorial on installation.

On the server in public_html folder there is a sub folder _vti_bin, I copied the file wkhtmltopdf-i386 from wkhtmltopdf-0.9.1-static-i386, but I am not able to execute it.

How to install wkhtmltopdf on (shared hosting) web server and get it working?

like image 832
Yogi Yang 007 Avatar asked Feb 16 '10 14:02

Yogi Yang 007


People also ask

How do I install Wkhtmltopdf on Amazon Linux?

To install wkhtmltopdf & wkhtmltoimage command line tools on Amazon Linux 2 server you've to download the RPM package then use yum package manager to install it on Amazon Linux 2 system. To check release version of wkhtmltopdf use the commands below. Usage help pages can be checked with –help command options.

How do I set up Wkhtmltopdf?

INSTRUCTIONS: Download an appropriate version of wkHTMLtoPDF library from http://wkhtmltopdf.org. If you are on Windows operating system then do install it under C:\ drive (for example c:\wkhtmltopdf). On Linux/UNIX, you can install it under /usr/local/bin and make sure wkhtmltopdf has execute permissions.


1 Answers

I've managed to successfully install wkhtmltopdf-amd64 on my shared hosting account without root access.

Here's what i did:

Downloaded the relevant static binary v0.10.0 from here: http://code.google.com/p/wkhtmltopdf/downloads/list

EDIT: The above has moved to here

via ssh on my shared host typed the following:

$ wget {relavant url to binary from link above} $ tar -xvf {filename of above wget'd file} 

you'll then have the binary on your host and will be able to run it regardless of if its in the /usr/bin/ folder or not. (or at least i was able to)

To test:

$ ./wkhtmltopdf-amd64 http://www.example.com example.pdf 
  • Note remember that if you're in the folder in which the executable is, you should probably preface it with ./ just to be sure.

Worked for me anyway

like image 190
Christopher Avatar answered Sep 21 '22 04:09

Christopher