Several changes have changed since the top answers were added. They worked for me, but not quite so, so I hacked a bit and suggested the following solution for Ubuntu 16.04 . For Ubuntu 14.04, see the Comment at the bottom of the answer. Sorry if this does not work for shared hosting, but it looks like this is goto answer for the installation instructions for wkhtmltopdf in general.
# Install dependencies apt-get install libfontconfig \ zlib1g \ libfreetype6 \ libxrender1 \ libxext6 \ libx11-6
Check this:
wkhtmltopdf http://www.google.com google.pdf
You should now have a file named google.pdf in the current working directory.
This approach downloads the binary from the site, which means that you can use the latest version instead of relying on the package managers to be updated.
Please note that for today, my solution includes a temporary fix to this error . I understand that the solution is really not very large, but I hope it can be removed soon. Be sure to check the status of the GitHub related issue to see if a fix is โโneeded when you read this answer!
For Ubuntu 14.04, you will need to upgrade to a different version of libssl. You can find the versions here . In any case, be sure to consider the consequences of lowering libssl before doing this on any production server.
Hope this helps someone!
Andy0708 Aug 07 '17 at 11:48 on 2017-08-07 11:48
source share