Why Odoo PDF reports print without headers on self-hosted servers
An invoice or report prints without its header, footer or styling, or the PDF generation fails outright on a server your team runs. In most cases the cause is one of two things: the wkhtmltopdf build installed on the server, and the URL Odoo gives wkhtmltopdf so it can fetch the header, footer and CSS assets. Odoo renders QWeb report templates to HTML and then hands that HTML to wkhtmltopdf, which loads its own sub-requests back from the Odoo server. If the binary is the wrong version, or those sub-requests point at an address the process cannot reach, the PDF comes out bare or does not come out at all. Teams that print QWeb reports from a self-hosted Odoo install need to understand this chain, whether they print invoices, quotations, delivery slips or custom reports.
This problem usually surfaces only after go-live. During testing, staff often view reports on screen or print a few documents from a browser session, and the HTML preview looks correct, so the PDF path goes unchecked. Once real invoices are printed, emailed to customers and attached to records, the gap appears. A proxy in front of Odoo makes it more likely, because Odoo may build internal URLs from the host and scheme it sees, which can differ from the public address. The reader should confirm the wkhtmltopdf version the server actually runs, not the one assumed in a runbook, and print a test document from each report type that the business depends on. Keep the report.url and web.base.url settings in mind as the second place to check, and confirm the exact requirements for your Odoo version in Odoo's documentation before changing the server.
How a QWeb report becomes a PDF
The print request starts in the browser, and an Odoo worker renders the QWeb template to HTML. The worker then hands the HTML to a separate wkhtmltopdf process, which fetches the header and footer pages from the URL Odoo supplies, using web.base.url and the report URL settings. If that URL resolves to a hostname or proxy path the wkhtmltopdf process cannot reach, the header and footer fail to load and the PDF prints without them. Check that URL first when headers go missing.
Print request flow, with the trust boundary and the header fetch that breaks behind a bad URL.
Why the wkhtmltopdf 0.12.6 requirement decides whether PDFs work
Odoo does not render its PDF invoices and reports itself. It hands the HTML produced by its QWeb templates to wkhtmltopdf, an external binary that runs on the server, and that binary turns the HTML into the PDF you send to customers. When the binary is missing, is the wrong build, or behaves differently from what Odoo expects, the symptoms are often confusing: a report prints without its header and footer, the PDF layout shifts, or the report fails outright. The version this topic and the sibling Ubuntu or Debian build page call for is 0.12.6, and that number is the starting point for the check, not the end of it.
The build matters as much as the version string. Operating system repositories sometimes ship wkhtmltopdf packages that are built against a different Qt base or without the patched features Odoo relies on for headers, footers and page sizing, and a package named wkhtmltopdf can still be a different binary from the upstream build. Do not rely on the package name. On the server, run wkhtmltopdf --version and confirm the reported version and whether the build uses patched Qt. Then print a report that includes a header and footer, and compare it with a PDF printed from a machine that is known to work. Record the result in your build notes so the check can be repeated after every operating system update.
The exact build variant, patch set and supported distributions for each Odoo version should be confirmed in Odoo's installation documentation for the release you run, since those requirements are set by Odoo and can change between versions. Ask your partner or internal team to document which binary is installed, where it lives on the path Odoo uses, and who owns the upgrade when the operating system is patched. A PDF test should be part of the go-live checklist and of any server upgrade, because a working invoice on the day of launch does not prove the next package update will leave it working.
Options for getting the right wkhtmltopdf build
This table compares four ways to get a wkhtmltopdf binary onto an Odoo server, along with the main risk and the check to run for each. Read each row against your own distribution and Odoo version, and treat the first check as the gate before any other option is trusted.
| Option | How it is installed | Main risk | Check to run |
|---|---|---|---|
| Operating system package | Installed with the distribution's package manager from its own repository | Version drift: the packaged release may not be 0.12.6 with patched Qt, so PDF output can differ from what Odoo expects | Run wkhtmltopdf --version and confirm it reports 0.12.6 with patched Qt before relying on it |
| Upstream 0.12.6 package for the distribution | Downloaded from the wkhtmltopdf project and installed as a local package file | Wrong package for the release or architecture, and no automatic security updates from the distribution | Match the package to your OS release and CPU architecture, then confirm the version string and rerun the test report |
| Container image that bundles the binary | Built into or mounted into the Odoo container image so the binary ships with the application | Image maintenance: the bundled binary must be rebuilt and tracked alongside each Odoo image tag | Inspect the image for the binary version, and confirm the report renders identically after every image update |
| Build from source | Compiled from the 0.12.6 source with chosen build flags and dependencies | Unexpected build flags or missing features, such as the patched Qt setting or header and footer support, leading to silent output differences | Compare the build configuration with the reference build, then test headers, footers, page breaks and barcodes on a sample invoice |
How report.url and web.base.url fix headers behind a proxy
wkhtmltopdf does not receive the report HTML from Odoo as a finished document. It fetches the header, the footer and the stylesheets by URL, running on the Odoo host itself. That means the address Odoo hands it must be reachable from the server, not just from a user's browser. Odoo builds these addresses from two settings: report.url in odoo.conf, and web.base.url, which is a system parameter stored in the database and editable under the developer settings. If either one points to an address the server cannot resolve or reach, the PDF prints without its header and footer, or the render fails outright.
The usual failure is a public hostname that works perfectly in a browser, such as an address served through Nginx or another reverse proxy, but fails from inside the server. Typical causes are a DNS name that resolves to a public IP the host cannot route back to, a firewall rule that blocks hairpin traffic, or a proxy that only accepts connections from outside. Pointing report.url at localhost or a private address avoids the routing problem, but it can break in another way: if the address uses HTTPS, the certificate presented for the public name will not match, and wkhtmltopdf rejects the connection. Check which of these applies by fetching the exact URL from the Odoo host with curl and reading the TLS error, if any.
Before changing anything, confirm the setting names, their precedence and their defaults in the documentation for the Odoo version you run, because the behavior has changed between releases and between the configuration file and the database parameter. Then decide which address the renderer should use, record it, and retest one invoice after each change. The proxy side of the problem, including proxy_mode and the X-Forwarded headers that let Odoo generate correct links, is covered on the Nginx page in this group, so treat that page as the next read once the report address itself is settled.
Setting up Odoo PDF reports with the right wkhtmltopdf version
This sequence confirms the wkhtmltopdf build your Odoo version expects, points Odoo at a working binary, sets the base URL so PDFs load their assets, and proves the fix with a single-page and a multi-page test report.
Confirm the Odoo version and wkhtmltopdf requirement
The person who maintains the Odoo server reads the installation notes for the Odoo version in use and notes the wkhtmltopdf release it expects. For Odoo 17.0 and later installs covered by this guide, the requirement to confirm is wkhtmltopdf 0.12.6, built with patched Qt, since unpatched builds from distribution repositories often omit headers and footers. Record the Odoo version from the Apps menu's About page so the target is written down before anything is changed. Done means you have one line: Odoo version, required wkhtmltopdf version, and the build type you intend to install. Confirm the exact requirement against the Odoo documentation for your release, because the version this step names must match your installed Odoo release.
Check the installed binary and its path
Run
wkhtmltopdf --versionas the user that runs the Odoo service, and runwhich wkhtmltopdfto see the path. A working setup prints a version string that matches the requirement and a patched Qt flag. If the command is not found, or it prints a version other than the required one, or the output says unpatched Qt, the binary needs replacing. Also check the path Odoo uses by reviewing thebin_pathor wkhtmltopdf setting in the Odoo settings and in theodoo.conffile, since a stale path can point to an older binary even after the system copy is fixed. Done means you have the version, path and build type written down.Install or replace the wkhtmltopdf binary
Remove or move the unsuitable binary, then install the required 0.12.6 patched-Qt package from the wkhtmltopdf project release files for your operating system and architecture. Place the binary on the path that the service user can execute, and make sure the file is owned by root with execute permission for all users. Avoid mixing an apt-installed package with a manually placed copy, because the two can shadow each other. If your distribution's package is unpatched, do not rely on it for headers and footers. Done when
wkhtmltopdf --versionrun as the Odoo service user prints the required version and the patched Qt build. If the command still reports an older version, check the PATH for the service user and the systemd unit environment.Set report.url and web.base.url in odoo.conf
Open the
odoo.conffile and setreport.urlto the address the Odoo server itself can reach, usually a local address such as the HTTP port on the same host, because the wkhtmltopdf process fetches CSS and images from that URL while it renders. Setweb.base.urlto the public address users type in the browser, including the scheme. When Odoo sits behind a reverse proxy, these two values serve different purposes and must not be assumed equal. Make sure the server can resolve and reach thereport.urladdress from its own network namespace, and that any certificate used by that URL is trusted by the host. Done when both keys are present in the file and a test request from the server toreport.urlreturns the Odoo login page.Restart the Odoo service and clear the cache
Restart the Odoo service with systemd, for example
sudo systemctl restart odoo, then confirm it started cleanly by checkingsystemctl status odooand the log file for startup errors. Log in to the database, open Settings, and check the Technical menu for the report and asset caches if your version exposes a regeneration option, then reload the browser with a hard refresh. A clean restart shows no errors about the report engine or missing binaries in the log. Done when the service reports active and the log contains no wkhtmltopdf or report.url errors during startup.Print a single-page test invoice
Open a posted customer invoice in a test database, not a live one, and choose Print, then PDF. Check that the PDF opens, shows the company header, footer, logo and page numbers, and that the amounts and fonts render. Also confirm that the browser does not show a blank page or a timeout. If the header is missing, the binary is probably unpatched or the report.url cannot be reached from the server. If the PDF shows broken images or no styling, check web.base.url and the proxy headers. Done when the single-page invoice shows full layout with the expected header and footer.
Print a multi-page report and check the footer
Run a report that spans several pages, such as a long sales order list or an inventory valuation report, and print it as PDF. Check that headers and footers repeat on every page, page numbers increase correctly, and the table breaks across pages without cutting rows in half. Repeat the run for one report in a second language or with a longer company name if your business uses them. If later pages lose the header or the render stops partway, review the wkhtmltopdf build and the paper and margin settings in the report layout. Done when a multi-page report renders completely and every page carries the expected header and footer.
Record the working settings for upgrades
Save the verified wkhtmltopdf version, its path, the odoo.conf values for
report.urlandweb.base.url, and the two test PDFs in your server runbook. Note that the binary is outside Odoo's own package, so every operating system upgrade or Odoo upgrade needs this check repeated. Add the same test to your staging environment before go-live. Done when the runbook entry names the binary version, the two URLs and the date of the last successful print test, and the team knows to repeat the test after any change to the server, proxy or Odoo version.
Checks for each install method before go-live
On Ubuntu or Debian, wkhtmltopdf is normally installed on the host itself, either from a distribution package or from a build you placed by hand. The check must run as the account that starts the Odoo service, because an interactive login shell can show a different PATH from the one systemd gives the odoo process. Run the command as that account and compare the result with what the service sees.
- Binary location: A package install usually places the file at
/usr/bin/wkhtmltopdf, but confirm it withwhich wkhtmltopdfrather than assuming the path. - Service environment: Inspect the unit with
systemctl show odoo -p Environmentand confirm that the directory holding the binary is on the servicePATH. - Version and build: Run
wkhtmltopdf --versionand expect 0.12.6 with a patched Qt build. Read the full output, because the version number alone can hide an unpatched build. - Package updates: Operating system upgrades can replace or remove the binary, so repeat the version check after every update window.
- Settings that differ: Nothing in
odoo.confpoints to the binary on this path. Confirm thatweb.base.urlandreport.urlmatch the public address, since report rendering loads page assets through them.
Before go-live, print one invoice as the service user and confirm that the header, footer and layout appear.
With the official Odoo image, wkhtmltopdf lives inside the container filesystem, not on the Docker host. The PostgreSQL container runs separately and plays no part in PDF rendering, so the check targets the Odoo container. Run the command against the running container, and repeat it against any image you build on top of the official one.
- Check inside the container: Run
docker exec -it <odoo-container> wkhtmltopdf --versionand confirm 0.12.6 with a patched Qt build. - Image updates: Pulling a newer Odoo image does not by itself update the binary. The binary changes only if the new image contains a newer build, so re-run the check after each pull and recreate the container.
- Custom images: If your Dockerfile installs wkhtmltopdf, run the check against the built image before deployment, not only against the base image.
- Host PATH is irrelevant: A correct host install does not help a container that lacks the binary, and the host version does not show what the container will render with.
- Configuration: Keep
odoo.confmounted at/etc/odooand verify thatweb.base.urlandreport.urlmatch the public address the reverse proxy serves.
Before go-live, generate a PDF from inside the running Odoo container and confirm the header and footer render correctly.
A source install does not place wkhtmltopdf anywhere by default. You install the binary yourself, and Odoo uses whichever wkhtmltopdf the service resolves on its PATH. Python packages in the virtual environment do not include the binary, so the check must cover the system path the running process actually uses. Follow the steps in Odoo's source installation guide for the Odoo side of the install.
- Binary location: Record the install path you chose, and confirm with
which wkhtmltopdfas the service user. - Version and build: Run
wkhtmltopdf --versionand confirm 0.12.6 with a patched Qt build, since a source install may not match a distribution package. - Virtual environment: Activating the virtual environment does not add the binary to the environment. Check the path with the service account, not your own shell.
- Upgrades: Odoo source updates do not reinstall wkhtmltopdf, so track the binary as a separate component with its own version record.
- Configuration: Confirm that the
odoo.conffile the service reads holds the intendedweb.base.urlandreport.urlvalues for the public address.
Before go-live, run a PDF report as the service user and confirm that the output matches the expected header and footer.
Failure modes behind blank, headerless or failed Odoo PDF reports
Most broken Odoo PDFs trace back to a handful of causes: the wkhtmltopdf binary, how Odoo reaches its own web server, and the fonts and styles available to the renderer. Each card names one symptom, the first check to run, and the section of this page that covers the fix.
Report prints without header or footer
The body of the document renders, but the running header and footer are missing. This usually means wkhtmltopdf is not the patched Qt build that Odoo expects, so header and footer rendering is skipped or ignored. Start by confirming the installed wkhtmltopdf version and whether it reports patched Qt. The version requirement and install check are covered in the wkhtmltopdf version section.
- Required wkhtmltopdf version
- 0.12.6
PDF generation times out
The print action hangs and eventually fails, often on larger invoices or reports. The renderer fetches the header, footer and assets from Odoo over HTTP, so a slow or unreachable web address can stall it. Check whether the request for a report completes quickly from the server itself. The report.url and web.base.url section explains how the renderer finds Odoo.
PDF is blank or shows raw HTML
The file opens but contains an empty page, or the markup appears as plain text. This points to a rendering step that did not run, or to a wrapper that was not converted. Confirm that the report is QWeb and that the PDF engine is set up for the report type. The QWeb rendering section walks through the render path from template to PDF.
Header fetch fails with certificate or connection error
Server logs show a failure while the renderer loads the header, footer or assets. The usual causes are a report.url that points to a host the server cannot reach, or an internal HTTPS address with a certificate the renderer does not trust. Compare the address in the logs with the proxy setup and test it from the Odoo host. The report.url and web.base.url section covers the settings to change.
Fonts or styling differ from the browser preview
The PDF uses substitute fonts, loses spacing or ignores stylesheet rules that look correct in the browser. The renderer is a separate WebKit engine with its own limits, and it may not have the fonts your templates expect. Compare the template CSS with what the renderer supports and check which fonts are installed on the server. The QWeb rendering section explains how styles reach the PDF.
What buyers ask about fixing Odoo PDF reports and the effort involved
Can our own team fix Odoo PDF reports without a partner?
Yes, for a single self-hosted server where your team has shell access to the host and someone who has already administered Linux services and an Odoo instance. The core fix is usually a matching wkhtmltopdf build installed on the server, plus correct URL settings in the Odoo configuration, and both steps can be checked on a test database before anything changes in production. The harder cases are teams with no Linux administration experience, no staging copy, or no one who can restart the Odoo service in a planned window. In those cases the risk is less the fix itself than changing the server without a way to confirm the result or roll back.
What makes the effort to fix Odoo reports larger or smaller?
Four factors move the effort the most. The first is the install method: a packaged install on Ubuntu or Debian, a source install, and a Docker deployment each place wkhtmltopdf in a different location and need a different check. The second is the number of report templates, since every custom QWeb report must be printed and reviewed, not only the standard invoice. The third is the proxy and TLS layout, because the rendering service must reach Odoo at an address that the reverse proxy and web.base.url describe correctly. The fourth is whether the server is air-gapped, because a host without internet access needs the wkhtmltopdf package delivered and verified by a method your change process allows. Ask any partner to list these four factors in the written scope.
What does the team need to provide before the work starts?
The work needs five inputs from your side. Server access, meaning an account with sudo rights on the Odoo host or the container host, and the ability to read the Odoo configuration file. A test database that is a recent copy of production, with personal data neutralized where your policy requires it, so that printing tests do not touch live records. A set of sample documents to print, including the invoices, delivery notes and any custom reports that show headers, footers, logos and multi-page layouts. Access to the people who own the report design, so differences can be judged. Finally, a change window in which the Odoo service can be restarted and the result checked. Without the sample documents, a fix can appear to work on a blank page while still failing on the real layout.
Will the PDF report problem come back after an update?
It can. Operating system package upgrades, a rebuilt Docker image, or a move to a newer base image can replace or change the wkhtmltopdf binary, and a fix applied by hand on one host may not survive that change. A reinstalled host may also lose the URL settings if they were set only on the command line. For this reason, record the installed wkhtmltopdf version, the path Odoo uses, and the configuration keys in your runbook, and add a printing test to the post-update checklist. Because the wkhtmltopdf requirement is tied to the Odoo release line you run, any Odoo major version upgrade should repeat the check against the new version's documentation rather than assuming the old setup carries over.
When should we bring in an outside partner for Odoo reports?
Bring in a partner when the scope goes beyond one server or one team's skills. Typical triggers include several Odoo databases or environments that share a proxy layout, a multi-node setup or a container platform with its own image pipeline, an air-gapped network where package delivery needs a formal approval, or a deadline tied to an audit or a customer-facing invoice run. A partner can also help when report printing is one symptom of a wider problem with the proxy, TLS or worker configuration. Ask for a written scope that names the hosts, the install methods, the report templates to be tested, the test database source and the retest steps, along with what the partner expects from your team. DeployOpen plans, implements and documents self-hosted Odoo inside the client's own infrastructure, and most engagements are fixed-scope, so the written scope is the basis of any quote.
How do we confirm the PDF fix worked before go-live?
Confirm it with a defined test, not with a single printed page. Print every report template you use on the test database, including the multi-page and multi-company cases, and check that headers, footers, logos, page numbers and fonts match the approved sample. Confirm that the wkhtmltopdf version on the server matches the version Odoo documents for your release, and that the base URL in the configuration resolves to the address users reach through the proxy. Repeat the same prints after a service restart, since the rendering service may pick up settings only at startup. Keep the printed output and the version details as evidence for change records, and rerun the set after each operating system or image update.
Security and operations for wkhtmltopdf on an Odoo server
Once reports print correctly, the wkhtmltopdf binary becomes a long-lived part of your Odoo server. The cards below cover the controls that keep it pinned, reachable only where it should be, and tested before each change reaches production.
Pin the binary version
Record the exact wkhtmltopdf version installed on every Odoo server, including the 0.12.6 build your Odoo version expects, and store it in your configuration management or change records. Check the version after each package update, since a silent upgrade from the operating system repository can change how headers and footers render. Treat any version change as a planned change with a rollback path.
Limit what rendering can fetch
wkhtmltopdf loads URLs while it builds a PDF, so a report can request internal addresses if its templates or inputs allow it. Restrict outbound connections from the Odoo host to the destinations it actually needs, and do not let user-controlled content add external resources to report templates. Review custom report templates for external references during code review.
Point the base URL deliberately
Set web.base.url and the report.url system parameter to the internal address the rendering process should use, and confirm that address resolves only to the Odoo service. Mixing a public hostname and a loopback address behind a proxy is a common cause of blank headers, so document which address is used for each purpose. Review these values whenever the proxy or DNS changes.
Trust the internal certificate
If report.url uses HTTPS with a private certificate authority, the wkhtmltopdf process must trust that CA through the system certificate store. Install the CA on the Odoo host, then confirm with a test report that TLS validation succeeds rather than disabling certificate checks. Recheck trust after certificate renewal, because a rotated internal certificate often breaks reports first.
Patch the binary and OS together
Schedule wkhtmltopdf and operating system security updates in the same maintenance window, then rerun a set of reference reports after each change. Shared libraries such as the fonts and the Qt and SSL components the binary uses can change under it, so a patched OS can alter rendering even when the binary is unchanged. Keep the previous package available for rollback.
Monitor PDF failures in logs
Alert on Odoo log entries that mention wkhtmltopdf, report rendering or PDF generation errors, and track how often they occur after each deployment. Look for timeouts, missing-binary messages and certificate errors, because each points to a different fix. Route these alerts to the team that owns the Odoo server so failures on invoices are noticed before customers report them.
What to confirm about wkhtmltopdf in your environment
Start by confirming the exact wkhtmltopdf build your installed Odoo version expects. Odoo's own documentation is the authority for this, and the page on this topic names the 0.12.6 requirement, but you should check it against the Odoo version you actually run rather than trusting a version number copied from an older guide. Then check whether your operating system repository offers that build. Many distribution packages ship a different release, and a build installed from a package that looks right can still render headers and footers incorrectly. Record the version reported by the binary on the server, since that is what Odoo calls.
Next, confirm how the server reaches the URL set in report.url. wkhtmltopdf fetches the page for each report through HTTP, so the Odoo host must be able to resolve and connect to that address, often from inside the server itself. Ask your network or platform team whether loopback or internal addresses are allowed, and whether the reverse proxy in front of Odoo forwards internal requests correctly. Check how the proxy handles the web.base.url value and the forwarded headers, because a proxy that rewrites hostnames or requires a login can produce blank or login-page PDFs. Test a report from the browser and from the command line on the server, and compare the results.
Finally, decide whether the server is air-gapped or has restricted outbound access. If it is, you will need an offline copy of the correct build, transferred and verified through your own change process, and you should confirm the same for any fonts the reports use. Also check whether your custom report templates, QWeb layouts or installed fonts change how the page renders, since a template that works on one machine can break on another with a different font set. Record the results of these checks in your deployment notes, so the next upgrade or rebuild starts from confirmed facts.
How DeployOpen scopes and supports Odoo PDF report fixes
DeployOpen treats a broken PDF report as a configuration and runtime problem to diagnose on your actual server, not a guess. We confirm the wkhtmltopdf build, the Odoo settings that generate report links, and the proxy headers in front of Odoo, then fix and document them in your environment.
How we scope
- Written scope lists which reports fail, which servers and Odoo versions are involved, and the test documents to check.
- Scope states whether the wkhtmltopdf binary, report.url and web.base.url settings, and reverse proxy headers are in or out.
- Engagements are fixed-scope, with deliverables and timelines agreed in writing before work starts.
How we build
- We check the installed wkhtmltopdf version and whether it is the patched Qt build Odoo expects.
- We set report.url and web.base.url for your public hostname and confirm the proxy forwards the original host and scheme.
- We test each affected report type, including invoices, with and without headers and footers, before changes move to production.
How we hand over
- You receive a record of the server changes, configuration values and the wkhtmltopdf version and install method used.
- Runbook steps cover reinstalling the binary after OS updates and checking report output after Odoo upgrades.
- We walk your administrators through the verification test so they can repeat it without us.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the fix is handed over.
- Support can cover re-checking PDF output when the operating system, Odoo version or proxy configuration changes.
- Ask in the quote which support windows and response arrangements apply to your Odoo version and hosting type.

