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

后端 未结 11 1737
刺人心
刺人心 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 19:01

    Version 12.5 of wkhtmltopdf only lists DEB files on their download page now. Being a mac user and not knowing much linux or what DEB files were I couldn't use the solutions posted.

    This page helped me get past the knew twist of downloading a DEB file: http://www.g-loaded.eu/2008/01/28/how-to-extract-rpm-or-deb-packages/

    Basically what I did was:

    1. Downloaded from https://wkhtmltopdf.org/downloads.html
    2. Unzipped the DEB file.
    3. Unzipped data.tar.xz
    4. Uploaded the binary in the unzipped 'usr' folder from step 3 (usr/local/bin/wkhtmltopdf)

    Then I found out that the 'exec' function was disabled on my host. So make sure you can specifically run 'exec' if you're using PHP to run this. "Can I run the wkhtmltopdf binary" isn't specific enough. My fault.

提交回复
热议问题