Free tools Windows power users keep installed
One-click scans. No signup required.
Start with the executable Odoo actually selected. In Odoo 12, Wkhtmltopdf failed (error code: -8). Message: b'' is not a diagnosis by itself. Capture the startup log, confirm the full wkhtmltopdf path and build, then test the branches that match your symptoms: a missing or unintended binary, incompatible packaging, fonts and font-cache state, unreachable report assets, or a report that exceeds available resources. The fixes below are reported remedies for particular environments, not a universal repair.
What error -8 tells you—and what it does not
Odoo is reporting that its wrapper around wkhtmltopdf failed. In the cited Odoo 12 cases, the message is empty (b''), so the code alone does not identify whether the executable was missing, fonts failed to load, a report URL could not be reached, or a large document exhausted resources. The same wording appears in different operating-system and report situations.
Before changing packages, record:
- Odoo version and deployment method (package, source checkout, container or virtual machine).
- Operating-system release and architecture.
- The complete Odoo log line showing the wkhtmltopdf path.
- The wkhtmltopdf version and build reported by that exact file.
- Whether every report fails or only one report.
- Whether the report’s HTML opens correctly in a browser.
This baseline lets you reverse a change and compare one report at a time.
1. Verify the binary Odoo invokes
Read Odoo’s startup log
Odoo normally logs the executable path it intends to use during startup. Copy that path exactly; do not assume it is the result of running which wkhtmltopdf in your interactive shell. A systemd service, supervisor process or container can have a different PATH.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →#1 Best Overall
Inspect and execute that path as the service user
Check that the file exists, is executable and belongs to the intended package or deployment artifact. Then run the version command using the absolute path:
/absolute/path/to/wkhtmltopdf --version
ls -l /absolute/path/to/wkhtmltopdf
Run the check with the same account that runs Odoo, or use an equivalent service-shell test. A binary that works for your login can still fail because the service has different permissions, environment variables, mounted directories or library paths.
Correct a wrong or missing path carefully
One Odoo 12 issue report described a log pointing to /usr/bin/wkhtmltopdf when the binary was not present there; placing the intended executable at that path reportedly fixed that installation. Treat this as a case report, not a prescription. Confirm the package and build you intend to run, update the service configuration or Odoo deployment consistently, restart the service, and verify the new startup log. Do not copy an arbitrary binary from another server.
2. Confirm wkhtmltopdf build compatibility
Odoo’s wkhtmltopdf guidance warns that Debian and Ubuntu repository builds do not include the patched Qt required for headers and footers. A package can therefore launch successfully while lacking features your reports need. Check the actual version and build string from the executable selected by Odoo, not a similarly named binary elsewhere on the host.
Forum reports involving Odoo 12 mention 0.12.1, 0.12.4 and 0.12.5 with different outcomes. Those reports do not establish a universally correct version. Match the build to Odoo’s guidance for your release and platform, test in a staging copy, and retest a report that uses the feature you depend on (especially headers or footers).
Use a controlled replacement
- Save the current path, version output and package metadata.
- Install the distribution-appropriate, intended build in a separate test environment or under a clearly managed path.
- Point the Odoo service to that executable.
- Restart Odoo and confirm the startup log names the new path.
- Print a small report, then one with headers or footers if those are required.
If the result worsens, restore the previous executable and configuration rather than layering multiple unverified packages.
3. Investigate fonts and the font cache when symptoms fit
Odoo issue #27487 concerns Odoo 12 on Ubuntu Desktop with particular system-font combinations. Forum replies describe installing ttf-mscorefonts-installer and rebuilding the cache with:
sudo fc-cache -f -v
This is a targeted diagnostic for environments where PDFs fail or render differently around fonts; it is not proof that Microsoft core fonts cause every error -8. Package names, availability and license prompts vary by distribution. Confirm that the package is appropriate for your release, complete any required prompts, refresh the cache visible to the Odoo service, restart the service if necessary, and compare the affected PDF with a known-good report.
Check what the service can see
- Run font-cache inspection under the service account or in the same container image.
- Verify that mounted font directories are present in the runtime namespace.
- Compare a report using ordinary installed fonts with one using the font family that fails.
- Keep a record of the cache timestamp and package change so you can roll back.
4. Test the report URL and every asset
A report can display correctly in your desktop browser while wkhtmltopdf, running on another host or container, cannot reach its URL. This produces a separate network or asset branch rather than proving that error -8 has one network cause.
Rank #4
Verify the URL from the rendering environment
Use the same hostname, scheme and port that Odoo gives to wkhtmltopdf. From the server or container running the process, request the report route and inspect the status, redirects and response body. Then check each stylesheet, image, webfont and barcode route referenced by the HTML. Internal DNS, firewall rules, proxy settings, authentication and TLS certificates can differ from those on an administrator’s workstation.
Interpret common clues
- HTML opens but styling is missing: investigate CSS, fonts, images and mixed-content or certificate errors.
- Barcode or image routes fail: inspect the generated URL and server logs for explicit network errors.
- Setting
report.urlmakes printing start but alignment changes: treat reachability and layout as separate issues; validate the base URL, scheme and asset paths rather than assuming the setting is a complete fix.
After correcting reachability, print the same report again without changing the binary or fonts so the result is attributable.
5. Separate large-report failures from ordinary reports
If short reports succeed and only very long PDFs fail, measure the report workload before changing global packages. Look for large tables, thousands of rows, high-resolution images, repeated page headers, extensive JavaScript or unusually large HTML. Check the service’s memory and process limits, temporary-directory capacity and container limits during a reproduction.
Recommended Free Tools
The Odoo Apps Store lists a third-party Odoo 12 module named fix_wkhtmltopdf for large PDFs, buffer overflow and error -8. That listing is a vendor claim for a narrow workload, not Odoo’s general remedy. Check its current Odoo-version support, source, maintenance and suitability in a staging database before installing it. First determine whether reducing the report or increasing an appropriate resource limit resolves the failure.
Choose the next test by evidence
| Observed pattern | First test | What the change affects | Evidence strength |
|---|---|---|---|
| Log path is absent or wrong | Inspect and correct the exact executable path | Binary selection and service environment | Reported Odoo 12 issue |
| Headers or footers fail on a repository package | Compare with an Odoo-compatible patched-Qt build | wkhtmltopdf feature compatibility | Odoo wiki guidance |
| Font-specific rendering or Ubuntu Desktop combination | Verify fonts, install the relevant package if appropriate, run fc-cache |
Fonts and cache | Issue and forum reports |
| Missing CSS, images, fonts or barcodes | Request the report and assets from the Odoo runtime | URL, network and authentication | Reported configuration and network cases |
| Only very large PDFs fail | Profile size and process resources | Report workload and limits | Third-party module listing for a narrow case |
Prefer the least invasive, reversible test that matches the symptom. There is no controlled comparison showing one of these remedies fixes every Odoo 12 installation.
Troubleshooting checklist
Every report fails immediately
- Confirm the startup-log path exists and runs as the service user.
- Record the version/build from that absolute path.
- Check shared libraries, execute permissions and service mounts.
- Print a minimal report after each single change.
Only one report fails
- Compare its HTML, CSS, images, fonts, JavaScript and barcode URLs with a working report.
- Reduce the report to a small data set to distinguish content size from a template defect.
- Inspect Odoo and web-server logs at the exact print time.
PDF is created but looks wrong
- Check the selected build when headers or footers are involved.
- Test asset reachability from the rendering host.
- Check service-visible fonts and cache state.
- Validate the configured base URL and HTTPS certificates.
Changes appear to do nothing
- Confirm the service restarted and the startup log changed.
- Ensure another wkhtmltopdf binary is not earlier in the service’s path.
- Clear stale containers or virtual environments only after recording their image and configuration.
Or skip the browser setup
If your immediate goal is a clean image or PDF of a web page rather than debugging Odoo’s server-side renderer, ScreenshotNeo provides a website screenshot API and MCP server. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups and chat widgets; each step can be disabled. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits are not billed, and response headers identify the page verdict and billing status. AI agents can use its MCP tools take_screenshot, get_page_info and capture_pdf.
One GET request is enough:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
See the ScreenshotNeo documentation for options such as full-page capture, CSS selectors, device presets, custom JavaScript, waits, blocked resources, cookies, headers, geolocation, PDF settings, caching and signed links. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Create a free ScreenshotNeo account.
Operational notes after the fix
- Keep the executable path and version in deployment documentation.
- Retest after operating-system, font-package, container-image or Odoo upgrades.
- Use a representative report suite: short, long, image-heavy, barcode, custom-font and header/footer reports.
- Monitor memory, temporary storage and rendering time for large jobs.
- Record the exact change and rollback procedure so production incidents remain reversible.
Frequently Asked Questions
Does error code -8 mean wkhtmltopdf is missing?
No. A missing executable is one reported cause, but the empty Odoo message also appears in cases involving fonts, assets, build compatibility and large reports.
Should I always install ttf-mscorefonts-installer?
No. Use it only when the environment and font symptoms match the reported Ubuntu/Odoo 12 case, and verify package availability and licensing requirements first.
Which wkhtmltopdf version is guaranteed for Odoo 12?
The cited evidence does not establish a universal version. Confirm Odoo’s guidance for your platform and test the actual build selected by your service.
Quick Recap
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.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors




