Migration guides · ERP

Replace wkhtmltopdf with pdfkiln in Odoo

Odoo prints reports, invoices, quotations and delivery slips with the wkhtmltopdf it finds in the PATH. The Debian package puts pdfkiln’s there, in place of the wkhtmltox package: nothing to configure in Odoo.

1. Install pdfkiln

On Debian and Ubuntu, amd64 and arm64: the signed APT repository installs /usr/bin/wkhtmltopdf in place of the wkhtmltox package, and brings Chromium’s fixes with apt upgrade.

curl -fsS https://apt.pdfkiln.org/pdfkiln-archive-keyring.asc | sudo tee /usr/share/keyrings/pdfkiln-archive-keyring.asc > /dev/null
printf 'Types: deb\nURIs: https://apt.pdfkiln.org\nSuites: stable\nComponents: main\nSigned-By: /usr/share/keyrings/pdfkiln-archive-keyring.asc\n' \
  | sudo tee /etc/apt/sources.list.d/pdfkiln.sources
sudo apt update && sudo apt install pdfkiln

Elsewhere: the Docker image, the archives and the Windows installer.

2. Point Odoo at it

Restart Odoo: it reads the program’s version when it starts. Then print a report.

3. Check

wkhtmltopdf --version
# wkhtmltopdf 0.12.6 (with patched qt), pdfkiln 1.0.4, Chromium 156.0.8078.80

The answer starts as wkhtmltopdf 0.12.6’s does: libraries that read the version keep working.

What Odoo expects, and what pdfkiln does

  • Odoo takes the version from the first run of digits and dots in wkhtmltopdf --version: pdfkiln answers wkhtmltopdf 0.12.6 (with patched qt), pdfkiln …, so Odoo sees 0.12.6.
  • Odoo waits 1,000 ms of JavaScript before printing. wkhtmltopdf always waits it whole; pdfkiln stops once nothing can change the page: 0.99 s faster on the two-page Odoo invoice, on Ubuntu (CI, 24 October 2026).
  • Headers and footers (--header-html, --footer-html) are laid out as wkhtmltopdf laid them out, margins computed the same way; web fonts of another origin load in a page opened from a file, as with wkhtmltopdf.

Tested

The Odoo 17 reports of the 32-template corpus keep their page count against wkhtmltopdf 0.12.6, and 99.1 % of the corpus’s words stay on the same page (Linux).

Something renders differently? Open an issue with the HTML and both PDFs: github.com/Jamalofski/pdfkiln/issues. The known differences are listed in the README.