Skip to content

Instantly share code, notes, and snippets.

@faniska
Last active March 11, 2024 11:51
Show Gist options
  • Star 42 You must be signed in to star a gist
  • Fork 14 You must be signed in to fork a gist
  • Save faniska/37f896d5e9de5fee925925d7caf3cb9e to your computer and use it in GitHub Desktop.
Save faniska/37f896d5e9de5fee925925d7caf3cb9e to your computer and use it in GitHub Desktop.
Install wkhtmltopdf with patched QT on Ubuntu Linux
# 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
@XeJames
Copy link

XeJames commented Dec 18, 2022

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

@totial
Copy link

totial commented Mar 30, 2023

Had text rendering problems with any method.
I got it fixed installing with:
sudo apt-get install wkhtmltopdf

@yize-dev
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment