Skip to content

Instantly share code, notes, and snippets.

@atularvind
Last active November 22, 2021 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atularvind/44a5a9c85dfd848123a616ecd2272dc6 to your computer and use it in GitHub Desktop.
Save atularvind/44a5a9c85dfd848123a616ecd2272dc6 to your computer and use it in GitHub Desktop.
INSTALL_WKHTMLTOPDF="True"
WKHTMLTOX_X64=https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb
sudo apt-get install wget git bzr python-pip gdebi-core -y
sudo wget http://ftp.us.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1+deb7u2_amd64.deb
sudo dpkg -i libpng12-0_1.2.49-1+deb7u2_amd64.deb
if [ $INSTALL_WKHTMLTOPDF = "True" ]; then
echo -e "\n---- Install wkhtml and place shortcuts on correct place for ODOO 11 ----"
#pick up correct one from x64 & x32 versions:
if [ "`getconf LONG_BIT`" == "64" ];then
_url=$WKHTMLTOX_X64
else
_url=$WKHTMLTOX_X32
fi
sudo wget $_url
sudo gdebi --n `basename $_url`
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin
else
echo "Wkhtmltopdf isn't installed due to the choice of the user!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment