Skip to content

Instantly share code, notes, and snippets.

@oprearocks
Forked from fedir/wkhtmltopdf@Debian8.sh
Created August 18, 2017 08:26
Show Gist options
  • Save oprearocks/b3fb683e0f19088bca1499609bec57d7 to your computer and use it in GitHub Desktop.
Save oprearocks/b3fb683e0f19088bca1499609bec57d7 to your computer and use it in GitHub Desktop.
Install wkhtmltopdf on Debian 8
apt-get update
aptitude install xfonts-base xfonts-75dpi fontconfig xvfb
mkdir ~/src/wkhtmltopdf -p
cd ~/src/wkhtmltopdf
wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
dpkg -i wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
echo 'xvfb-run --server-args="-screen 0, 1024x768x24" /usr/local/bin/wkhtmltopdf $*' > /usr/bin/wkhtmltopdf.sh
chmod a+rx /usr/bin/wkhtmltopdf.sh
ln -s /usr/bin/wkhtmltopdf.sh /usr/local/sbin/wkhtmltopdf
/usr/local/sbin/wkhtmltopdf https://www.google.fr output.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment