-
-
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 |
It's not working, I am using odoo 12 still getting error: Wkhtmltopdf failed (error code: -8). Message: b''
I've found the solution from the odoo forum:
install the ttf-mscorefonts-installer package and clear your font cache:
sudo apt install ttf-mscorefonts-installer
sudo fc-cache -f -v
by Mitul Shingala
@faniska worked like a charm, thanks for sharing
Thank you! It's work well with Odoo 12 Community on Debian 9
It worked! Thank you! You saved me there! :D
Thank you! It's work well with Odoo 12
Neato! Nifty, man. Thanks, dawg.
Thanks!
Thank you! You saved my day! It works with Mint 18.3 Cinnamon 64-bit 3.6.7.
To those who get the error "wkhtmltopdf throws "QSslSocket: cannot resolve CRYPTO_num_locks" when using a template", I follow the advise and it works.
sudo apt-get install libssl1.0-dev
Thanks!!
Solved the problem:
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support
thanks!!!
Still helpful, thanks !
Works well on Ubutu 18 & Odoo 13. Great!
wow worked like charm in ubuntu 20
downloaded .deb file and installed it!!!
thank you, worked in debian 9 stretch with odoo version 12
Thank you, definitely useful !
Many thanks
Worked for debian 11 bullseye
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
It's not working, I am using odoo 12 still getting error: Wkhtmltopdf failed (error code: -8). Message: b''