-
-
Save faniska/37f896d5e9de5fee925925d7caf3cb9e to your computer and use it in GitHub Desktop.
# Uncomment the next line if you have installed wkhtmltopdf | |
# sudo apt remove wkhtmltopdf | |
cd ~ | |
# Select an appropriate link for your system (32 or 64 bit) from the page https://wkhtmltopdf.org/downloads.html and past to the next line | |
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz | |
tar xvf wkhtmltox*.tar.xz | |
sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin | |
sudo apt-get install -y openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig |
Using minimalist Debian (TurnkeyLinux Distribution) tar won't have xz installed so error occurs during tar -xfz:
user@odoo ~# tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar (child): xz: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Solution is to upgrade tar:
user@odoo ~# apt install xz-utils
Had text rendering problems with any method.
I got it fixed installing with:
sudo apt-get install wkhtmltopdf
thanks
sudo apt-get update
sudo apt-get install -y wget xfonts-75dpi
Download the latest precompiled binary from the releases page:
Install the downloaded package:
sudo apt install -f ./wkhtmltox_0.12.6.1-2.jammy_amd64.deb
Verify the installation by checking the version of wkhtmltopdf:
wkhtmltopdf --version
#Next step
sudo apt-get update
Install dependencies
sudo apt-get install -y
wget
xfonts-75dpi
libxrender1
libfontconfig1
libx11-dev
libasound2
libxtst6
libssl-dev
Download the package
Install the package
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
Fix any missing dependencies
sudo apt-get install -f
Verify symlinks are created
sudo ln -sf /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdf
sudo ln -sf /usr/local/bin/wkhtmltoimage /usr/bin/wkhtmltoimage
Verify installation
wkhtmltopdf --version
Great @faniska!
Im my case I nedd add too:
ln -s /usr/bin/wkhtmltopdf /usr/local/bin/wkhtmltopdf