Skip to content

Instantly share code, notes, and snippets.

@oanhnn
Created May 3, 2018 08:30
Show Gist options
  • Save oanhnn/16d943da191629d6f86d567e52b299e7 to your computer and use it in GitHub Desktop.
Save oanhnn/16d943da191629d6f86d567e52b299e7 to your computer and use it in GitHub Desktop.
Install wkhtmltopdf on AMZ Linux
#!/usr/bin/env bash
VERSION=${1:-0.12.4}
yum -y install fontconfig libXrender libXext xorg-x11-fonts-Type1 xorg-x11-fonts-75dpi freetype libpng zlib libjpeg-turbo openssl icu
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/${VERSION}/wkhtmltox-${VERSION}_linux-generic-amd64.tar.xz --dns-timeout=5 --connect-timeout=5
tar -xJf wkhtmltox-${VERSION}_linux-generic-amd64.tar.xz
cp wkhtmltox/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf
cp wkhtmltox/bin/wkhtmltoimage /usr/local/bin/wkhtmltoimage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment