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

后端 未结 11 1710
刺人心
刺人心 2020-11-30 17:58

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 st

11条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 18:50

    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

提交回复
热议问题