I am running an odoo 18 instance in a Docker environment (application and database). Within a custom module, I created a custom layout SCSS file that uses @font-face directives to load custom fonts (Verdana (norma, bold, italic)), and changes the default font size to 7pt.
The generated PDF (e.g. for invoices) looks correct when viewing it in the browser or an external application (e.g. Adobe Reader) - even if scaled.
[Posting image or link is not possible due to too few karma points :-)]
However, when such PDF is physically printed on paper (e.g. using Adobe Reader), the PDF differs significantly from the "online" version. Portions of some random characters within the invoices text are missing:
[Posting image or link is not possible due to too few karma points :-)]
The issue is reproducible on different printers. It does, however, not always happen. So far, I could not identify any circumstances that the issue is related to. Sometimes the PDF is printed correctly with the first attempt, sometimes it looks distorted. If the issue is visible in the print output and the same document is printed again, everything might look correct.
I checked the generated PDF: All used fonts are embedded.
Any ideas?
Thank you both for your timely answers.
I started issue analysis with Piyush's comments/ideas and changed the font settings (only type not size) in the SCSS file which didn't do the trick. I then changed the odoo.conf options as suggested; no change either. By accident, I then found out that it makes a significant difference whether I print a document from within the PDF browser plugin (from within the odoo web application) or if I download the document and print it using Adobe Reader on the windows machine: Print output from within the browser plugin looks crappy, print output created by Adobe Reader looks well. Same effect independent from the fonts being used.
Why could that be the case? Isn't the browser plugin something that's loaded by the browser and physically runs on the same machine as the browser itself?