Skip to content

Instantly share code, notes, and snippets.

@Rajeshr34
Last active February 18, 2025 00:30
Show Gist options
  • Save Rajeshr34/2e9b2438ff142e51c729b4b9b772680a to your computer and use it in GitHub Desktop.
Save Rajeshr34/2e9b2438ff142e51c729b4b9b772680a to your computer and use it in GitHub Desktop.
Wkhtmltopdf With Patched QT Setup Ubuntu 16+
cd ~
apt-get install libfontenc1 xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y
#https://github.com/wkhtmltopdf/wkhtmltopdf/releases
#replace arch
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
apt --fix-broken install
@WhatsDiscuss
Copy link

Works on ubuntu 22.04

@swampopus
Copy link

From Cortex on StackOverflow (https://stackoverflow.com/a/77218633/492132). Works on Ubuntu 24 as well:

sudo apt-get install xfonts-75dpi
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo dpkg -i wkhtmltox_0.12.6.1-2.jammy_amd64.deb
sudo apt --fix-broken install
rm wkhtmltox_0.12.6.1-2.jammy_amd64.deb 

Confirm it works with:

wkhtmltopdf -V
=> wkhtmltopdf 0.12.6.1 (with patched qt)

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