Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jabedhasan21/aae633bd767b19014955ef0266536796 to your computer and use it in GitHub Desktop.
Save jabedhasan21/aae633bd767b19014955ef0266536796 to your computer and use it in GitHub Desktop.
Install wkhtmltopdf on Ubuntu 16.04 LTS

Install the latest wkhtmltopdf binary, extract it, and copy the wkhtmltopdf and wkhtmltoimage executables to /usr/bin/.

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xf  wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cd ./wkhtmltox/bin/
sudo cp -R ./* /usr/bin/
wkhtmltopdf -V

If you get an error relating to libxrender1, fix it with:

sudo apt-get install libxrender1

See also this gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment