Last active
March 26, 2025 02:11
-
-
Save faniska/37f896d5e9de5fee925925d7caf3cb9e to your computer and use it in GitHub Desktop.
Install wkhtmltopdf with patched QT on Ubuntu Linux
This file contains hidden or 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
# 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sudo apt-get update
sudo apt-get install -y wget xfonts-75dpi
Download the latest precompiled binary from the releases page:
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
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
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
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