How to fix switch --header-spacing, --footer-html, is not support using unpatched qt and will be ignored at least install wkhtmltopdf the odoo way in ubuntu"

2025-05-02 03:55:15,999 87076 WARNING codeburnout odoo.addons.base.models.ir_actions_report: wkhtmltopdf: The switch --header-spacing, is not supported using unpatched qt, and will be ignored.The switch --header-html, is not supported using unpatched qt, and will be ignored.
The switch --footer-html, is not supported using unpatched qt, and will be ignored.
I first saw this error while generating PDF reports in Odoo—everything looked off. Logos missing. Footer gone. Header spacing ignored. You might be tempted to fix it by tweaking the report template, but the real culprit? A wrongly installed version of wkhtmltopdf.
I could’ve just called this post “How to Install wkhtmltopdf the Odoo Way” — because really, that’s the heart of this issue. Installing wkhtmltopdf
with sudo apt install wkhtmltopdf
is where the problem begins. That command grabs a version without the patched Qt library that Odoo needs to format reports correctly.
So here’s how I install wkhtmltopdf the right way — the Odoo way. This works across all versions from Odoo 9 up to Odoo 18, and on Ubuntu 18.04 through 24.04.
Remove the Faulty Version of wkhtmltopdf
First, clean up the bad installation and also make sure its gone, with below commands
sudo apt remove --purge wkhtmltopdf
sudo rm /usr/local/bin/wkhtmltopdf
sudo rm /usr/local/bin/wkhtmltoimage
sudo apt autoremove
Install Required Dependencies (libssl1.1)
Newer Ubuntu versions come with libssl3, but wkhtmltopdf 0.12.5 depends on libssl1.1, which is deprecated. So we’ll grab the specific version ourselves straight from archive.ubuntu.com.
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb
sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
Download the Right wkhtmltopdf Version
Now download the patched Qt version of wkhtmltopdf (this is the gold standard for Odoo compatibility):
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.focal_amd64.deb
Install the Downloaded wkhtmltopdf Package
Run the installer manually using dpkg
, make sure to be in the same directory where the file is downloaded or give the full path to the .deb
sudo dpkg -i wkhtmltox_0.12.5-1.focal_amd64.deb
Lastly: Verify the Installation
It summed up to four steps, you can verify a correct installation by running the command wkhtmltopdf --version
. If the output includes “with patched qt,” you’re good to go your reports will now render properly with logos, headers, footers, and correct spacing.
wkhtmltopdf 0.12.5 (with patched qt)
This one frustrated me more than it should have. A few small switches in a log file led me down a rabbit hole. But now you know the root of the problem and more importantly, how to fix it in a future-proof way.
If this helped, and you still run into issues, don’t hesitate to drop a comment or start a conversation below. I’m always just a message away. Until next time Happy Coding Without Burnout 💻🔥