The PDF rendering issue you are experiencing on MacOS when using Odoo might be related to the wkhtmltopdf configuration, font rendering, or compatibility with the macOS platform. Below are some steps and suggestions to resolve this issue:
Troubleshooting Steps:
1. Font Rendering Issue
2. Verify wkhtmltopdf Configuration
3. Update Report URL
4. Debug Rendering Behavior
- Open browser developer tools and inspect how the report appears in the browser before rendering.
- Check for any errors in Odoo's log file during report generation.
5. Verify CSS and Template Consistency
- Ensure consistent font and CSS usage in your report template.
- Sometimes, conflicting CSS rules can cause issues with PDF rendering.
Recommendations for Better Compatibility
Switch to a Different PDF Rendering Library
If wkhtmltopdf is unreliable, consider switching to an alternative library like WeasyPrint. You can install and configure it for Odoo as follows:
- Install WeasyPrint:
pip install weasyprint
- Configure Odoo to Use WeasyPrint:
Modify your report templates or write a custom module to use WeasyPrint instead of wkhtmltopdf.
Check for Odoo Updates or Patches
Verify if there are any updates or patches for your version of Odoo that address PDF generation issues.
Use a Virtual Environment
Run wkhtmltopdf in a virtualized Linux environment (e.g., Docker) to avoid Mac-specific issues.
Summary
This issue likely stems from font rendering or wkhtmltopdf inconsistencies on MacOS. Start by verifying the fonts, CSS, and wkhtmltopdf installation. If the problem persists, consider alternative solutions like WeasyPrint or using a virtualized environment.
If you need help with any of these steps, let me know!
I do have the same issue, were you able to solve it?