Troubleshooting
If you encounter an issue not covered here, please:
- Check if it's already been reported on the GitHub issues or GitHub discussions.
- Open a new issue or start a discussion if needed.
Chromium
Blank or Missing Content
- Dynamic Content: If your page relies on JavaScript to render, Chromium might print before it finishes. Use
waitDelayorwaitForExpressionto pause the conversion until the page is ready. - Backgrounds: By default, browsers remove backgrounds for printing. Enable the
printBackgroundform field, or use the CSS property-webkit-print-color-adjust: exact;. - Network Idle: For versions after 8.11.0, try setting the
skipNetworkIdleEventfield to false. - Updates: Consider upgrading to the latest Gotenberg version to benefit from debugging features like Network Errors or Invalid HTTP Status Codes.
Localhost / Missing Assets
- Container Networking: The Gotenberg container has its own network. If you try to convert
http://localhost:3000, it looks inside the container, not your host machine. Use your host's actual network IP, or Docker's DNS (e.g.,host.docker.internal). - Unresolved Assets: Ensure all CSS, fonts, and images are either accessible from the internet, sent as additional files in your multipart request, or embedded as Base64.
Large PDFs
- Webfonts can significantly increase PDF sizes. For custom fonts, refer to the fonts configuration section (Issue #521).
- A known bug in Chromium can sometimes cause duplicate images (Issue #1077).
Fails to Start
- Increase the startup timeout (see Chromium module configuration).
- On macOS, consider disabling the Use Virtualization Framework in Docker Desktop (Issue #792).
Print Error (-32000)
- This error often occurs when converting massive documents. Increasing container memory might help, but note that it is a known Chromium bug (Issue #788).
- Unusually large headers or footers injected via the API can also trigger this error.
Clipped Screenshots
- If your screenshots are repeating or clipped, set the
skipNetworkIdleEventfield to false (Issue #1065).
Timeouts (503)
- Overload: Check if your Gotenberg instance is overwhelmed. Scale horizontally by adding more instances if needed.
- Accessibility: Ensure the target page’s resources respond quickly.
- Configuration: Increase the API timeout (API module configuration). Optionally, define a maximum queue size for faster request aborts (Chromium module configuration).
LibreOffice
Layout & Font Shifts
- Missing Fonts: LibreOffice relies on installed system fonts to calculate page breaks and layout. If your document uses a font not present in the container, LibreOffice will substitute it, causing shifted layouts. You must install the required fonts via a custom
Dockerfile(see Fonts configuration).
Server Errors (500)
- Resource Limits: Office document conversion is resource-heavy. Try increasing Gotenberg’s memory and CPU allocations (Issue #465).
Fails to Start
- Increase the startup timeout (LibreOffice module configuration).
- Debian users should ensure they are using a current version of the distribution (Issue #794).
- For Synology and Paperless-ngx users, consult this configuration comment.
PDF/A-1a Support
- Starting with version 7.6, LibreOffice no longer supports PDF/A-1a. It previously generated PDF/A-1b files anyway, though some validators misidentified them (LibreOffice commit).
Timeouts (503)
- Overload: Check if your instance is overloaded; consider increasing instances or resource allocation.
- Configuration: Increase the API timeout (API module configuration) and the LibreOffice startup timeout (LibreOffice module configuration).
- Queuing: Optionally, set a maximum queue size for quicker request aborts (LibreOffice module configuration).
