Skip to content

Instantly share code, notes, and snippets.

@Fridus
Last active August 19, 2016 10:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Fridus/60a7604a6f3bc199d3b7 to your computer and use it in GitHub Desktop.
Save Fridus/60a7604a6f3bc199d3b7 to your computer and use it in GitHub Desktop.
Install wkhtmltopdf
#!/usr/bin/env bash
_UVERSION=${1:-precise}
_WVERSION=0.12.2.1
_WVERSION_M=`echo $_WVERSION | awk -F. '{print $1"."$2}'`
FILENAME="wkhtmltox-${_WVERSION}_linux-${_UVERSION}-amd64.deb"
URL="http://download.gna.org/wkhtmltopdf/${_WVERSION_M}/${_WVERSION}/${FILENAME}"
apt-get update
apt-get install -y xvfb xfonts-75dpi
mkdir -p /tmp/wkhtml && cd /tmp/wkhtml
wget $URL
dpkg -i ${FILENAME} && \
cd && rm -rf /tmp/wkhtml
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment