October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
Odoo

How to Fix Odoo wkhtmltopdf PDF Generation Errors

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If an Odoo report looks right in HTML but loses its styling, logo, or header in PDF, first check which wkhtmltopdf build Odoo is running and whether that process can reach Odoo’s report assets. Compare the HTML and PDF versions of the same report, then check the internal report.url setting and the server logs. That sequence separates template problems from PDF-renderer and network problems without changing public URL settings unnecessarily.

How Odoo turns a report into a PDF

Odoo reports are QWeb pages. Odoo can show a report as HTML or generate a PDF, and the PDF rendering itself is performed by wkhtmltopdf. Those two routes are useful diagnostic controls: if both outputs are wrong, investigate the template or its assets; if the HTML is correct and only the PDF is wrong, focus on wkhtmltopdf, its network access, or its build.

Before editing a template or installing a module, record the Odoo release, operating system, wkhtmltopdf version, and the exact report and failure. A fix that works for one Odoo generation or deployment is not automatically appropriate for another.

Check the wkhtmltopdf build and patched Qt support

Run wkhtmltopdf --version on the Odoo server, using the same service account and environment that run Odoo. The output should identify the version and indicate whether it was built with patched Qt. Checking as an administrator in a different shell can be misleading if that account sees a different executable or PATH.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Odoo’s maintained wkhtmltopdf compatibility wiki, edited December 6, 2023, recommends different builds by Odoo release: 0.12.5-1 for Odoo 10–15, and 0.12.6.1-3 for Odoo 16 and later. Verify the current compatibility guidance for the exact release and operating system before installing or replacing a package.

This build check is especially important when headers or footers disappear. The compatibility wiki says Debian and Ubuntu repository builds do not support headers and footers because they lack the required patched Qt changes. A package that starts successfully can still be the wrong build for Odoo report rendering.

  • If the reported version does not match the recommendation for your Odoo generation, test the compatible build in a staging environment before changing production.
  • If the version appears correct but output is still broken, continue with the HTML-versus-PDF comparison and asset reachability checks; version alone does not establish that the renderer can load report resources.

Compare the HTML and PDF routes for the same report

  1. Open the report’s HTML route, which uses Odoo’s /report/html/ report route, for the same record and report that fails in PDF.
  2. Open the corresponding PDF route, which uses /report/pdf/.
  3. Compare the same elements in both outputs: layout, fonts, images, logo, header, footer, and page breaks.
  4. Use the difference to choose the next branch below rather than changing several settings at once.

If HTML is already wrong

Work on the QWeb template, report assets, and intended external layout first. A PDF renderer cannot correct a logo reference or stylesheet that is already missing in the HTML report. Check the rendered HTML source and make sure custom fonts are included in the report asset bundle. Confirm the template calls the external layout that is supposed to supply the report’s shared structure.

If HTML is right but PDF is wrong

The PDF process may be unable to retrieve the linked stylesheets, fonts, images, or other assets. Odoo’s documentation says that when a PDF is missing styles while the HTML version is styled, wkhtmltopdf probably cannot reach the Odoo web server to download them. Continue by checking the internal URL configuration and the requests made during PDF generation.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set an internal report URL behind a proxy

Odoo uses web.base.url as the root for linked files. In a reverse-proxy or container deployment, the public URL that a user visits may not be the address that the Odoo server process can reach from inside its own network. Odoo provides the report.url system parameter for the report renderer to use an internally reachable address.

  1. Enable developer mode in Odoo.
  2. Open Settings → Technical → Parameters → System Parameters. The exact visibility of the Technical menu depends on developer mode and the Odoo edition.
  3. Inspect the existing report.url value. Set it to an address reachable from the Odoo server, such as the Odoo service hostname and port used within your deployment network.
  4. Generate the same report again and inspect the logs for asset requests. Confirm that the internal address resolves and serves the report assets to the Odoo process.

Do not casually replace web.base.url with the internal address. That parameter has broader effects than report rendering. If proxy behavior or login redirects cause Odoo to keep changing the base URL, consider web.base.url.freeze to prevent unwanted automatic changes. Confirm the effect of freezing it in your deployment before making the change.

Use logs to identify the failing asset or connection

Generate one failing report while watching the Odoo application logs, reverse-proxy logs, and container logs that apply to your deployment. Look for connection refusals, missing assets (404), access denials (403), certificate errors, or timeouts at the time of generation. These messages help distinguish a bad URL from an authorization, TLS, or slow-response issue.

  • Connection refused or name resolution failure: check that the hostname and port in report.url work from the Odoo server or container, not only from a developer’s workstation.
  • 404 for CSS, fonts, or images: check the generated asset path, proxy routing, and whether the referenced file is actually available at that path.
  • 403 or authentication redirect: inspect access rules and proxy behavior. The renderer needs to retrieve the report resources; an address that redirects to a login page will not supply the intended assets.
  • Certificate errors: verify the certificate chain and the renderer’s ability to validate it for the address it uses.
  • Timeouts: determine which request is slow and whether the issue is an unavailable asset, overloaded server, or report workload before increasing any timeout.

Check the rendered HTML source alongside these logs. If a resource URL in the HTML points to the wrong host or path, fix the URL generation or deployment routing; if the URL is correct but the request fails, fix reachability or access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Fix report assets and layout at the source

Once the renderer can reach Odoo, review the report’s QWeb structure and assets. Custom fonts need to be included in the report asset bundle, and the template should call the external layout intended for that report. Compare the HTML source and PDF rather than relying only on a browser’s visual rendering: a browser may have cached resources or access to local assets that the wkhtmltopdf process does not.

Change one source of failure at a time and regenerate the same report. This makes it possible to tell whether the change fixed the HTML template, the PDF renderer’s access, or both.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Diagnose error codes and very long reports carefully

Error codes such as -8 or -11 are not enough on their own to identify a universal cause. Keep the full Odoo traceback and wkhtmltopdf output, the affected Odoo and operating-system versions, the report size, and whether headers or footers are enabled. A code can occur in a particular failure path, but the surrounding logs and a reproducible report are needed to choose a remedy.

Large reports can expose limits beyond ordinary asset loading. Odoo’s compatibility wiki describes multi-page table crashes and exponential growth in memory and file-descriptor use on documents of roughly 500 or more pages. That is a reported problem scale, not a guaranteed cutoff: a report can fail earlier or succeed beyond it depending on its content and environment.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Test a reduced page range or a smaller record set to see whether the failure tracks report size.
  • Simplify highly complex tables and compare output on a smaller case before changing resource limits.
  • Evaluate increased limits or temporarily removing headers and footers only as a tested workaround, particularly if the compatible patched-Qt build is not available in the environment.

A third-party Apps Store module named fix_wkhtmltopdf claims to address buffer-overflow and error-code -8 failures for large PDFs, particularly where headers and footers are not required. Treat it as a version-specific third-party intervention, not an official Odoo setting or a general fix. Validate it against your Odoo release and report in staging before considering production use.

Or skip the browser setup

For a separate visual check of a web page, ScreenshotNeo can return a screenshot from one GET request. It is not a replacement for fixing Odoo’s wkhtmltopdf pipeline or generating an Odoo report PDF; use Odoo’s HTML and PDF routes for that diagnosis. The API can help capture a page for visual review without setting up a browser locally. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents using Claude, Cursor, or another MCP client. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month with no card.

What to include when escalating a persistent failure

If a failure remains reproducible after checking the build, route comparison, URL access, and assets, prepare a compact test case for your Odoo administrator or support provider. wkhtmltopdf support guidance asks for the version, operating system and version, and a detailed description with a test case containing the HTML, CSS, and JavaScript needed to duplicate the problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Odoo release and operating-system version.
  • The output of wkhtmltopdf --version from the Odoo service environment.
  • The HTML and PDF result for the same report, with a concise description of what differs.
  • Relevant Odoo, proxy, and container log lines, including the failed asset URL or full renderer error.
  • A small, safe-to-share reproduction that retains the layout or asset behavior that triggers the failure.

Frequently Asked Questions

Does error code -11 identify a specific Odoo fix?

Not from the code alone. Preserve the full renderer output and Odoo traceback, then use the surrounding request and report-size evidence to identify the failing path.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Read next

Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.