Last active
May 31, 2020 21:58
-
-
Save apphancer/8654e82aa582d1cf02c955536df06449 to your computer and use it in GitHub Desktop.
Install wkhtmltopdf 0.12.4 on CentOS 6.x and 7.x
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install dependencies (if needed) | |
$ yum install -y xorg-x11-fonts-75dpi | |
$ yum install -y xorg-x11-fonts-Type1 | |
$ yum install xz | |
# Get latest version of wkhtmltopdf (replace version number if needed) | |
$ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
# Untar and move wkhtmltox | |
$ unxz wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
$ tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar | |
$ mv wkhtmltox /usr/bin/wkhtmltox | |
# Add wkhtmltopdf to .bash_profile (optional) | |
nano .bash_profile | |
# Add the following line at the end of the .bash_profile file | |
# export PATH=/usr/bin/wkhtmltox/bin:$PATH | |
# And don't forget.. | |
$ rm wkhtmltox-0.12.4_linux-generic-amd64.tar | |
# Finally enjoy! | |
$ wkhtmltopdf http://www.google.com google.pdf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment