Repository navigation
[ADD] install_script: optional PDFKiln as wkhtmltopdf (INSTALL_PDFKILN) - #475
Open
Jamalofski wants to merge 1 commit into
Open
Jamalofski wants to merge 1 commit into
Jamalofski wants to merge 1 commit into
Conversation
Ubuntu's wkhtmltopdf package is built without wkhtmltopdf's patched Qt: Odoo prints reports without their header and footer, and refuses to print several records into one PDF. Ubuntu 26.04 has no wkhtmltopdf package at all. INSTALL_PDFKILN="True" installs PDFKiln from its signed APT repository instead, on amd64 and arm64: the wkhtmltopdf 0.12.6 command line in /usr/bin, rendered by Chromium. Other architectures, or a failed installation, fall back to Ubuntu's package. The default, "False", changes nothing.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #463 the script installs wkhtmltopdf from the Ubuntu repositories. That package is built without wkhtmltopdf's patched Qt, which Odoo 19 relies on:
--header-htmland--footer-html(ir_actions_report.py#L583-L589). An unpatched build ignores both, so reports print without the company header and the page numbers.Ubuntu 26.04 has no wkhtmltopdf package at all.
This PR adds an opt-in option,
INSTALL_PDFKILN,Falseby default. Set toTrue, the script installs PDFKiln from its signed APT repository instead of Ubuntu's package, on amd64 and arm64. PDFKiln is a drop-in wkhtmltopdf under the MIT license: the wkhtmltopdf 0.12.6 command line in/usr/bin/wkhtmltopdfand/usr/bin/wkhtmltoimage, rendered by a current Chromium. Its--versionkeepswkhtmltopdf 0.12.6 (with patched qt), the string Odoo checks. On other architectures, or if the installation fails, the script removes the repository again and falls back to Ubuntu's package. WithFalse, nothing changes.Tested
INSTALL_PDFKILN="True": Odoo 19 installed and started by the script, and a demo invoice printed with its header and footer.sudo,curlanddpkgstubbed:Falseruns exactly as before;Trueon amd64 and arm64 installs PDFKiln only; i386, or a failed installation, falls back to Ubuntu's package.ubuntu:24.04,ubuntu:26.04anddebian:trixiecontainers and prints six standard Odoo 20 documents: all six with their header and footer with PDFKiln, none with Ubuntu 24.04's package (results).In a Docker container such as
test_install/, Chromium's sandbox needs PDFKiln's seccomp profile: Docker's default profile blocks it. On a server or a VM there is nothing to add.I'm the author of PDFKiln. The 20.0 branch has the same script, so the change applies there as is.