Skip to content

Instantly share code, notes, and snippets.

@hacksalot
Last active May 10, 2021 13:01
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save hacksalot/75523e793bd2ee2d5f25fdac2dd15436 to your computer and use it in GitHub Desktop.
Save hacksalot/75523e793bd2ee2d5f25fdac2dd15436 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