I'm using Odoo 13 in Docker. When viewing a PDF preview using PDF.JS (such as work instructions on a work order) there is no print button when using a Chrome-based browser, and pressing ctrl+p shows the error message "Warning: Printing is not fully supported by this browser." There is also a "More Information" button, which when pressed displays "PDF.js v? (build: ?)." Printing, both with ctrl+p and with the print button, works as expected in Firefox.
I found the following open Github issue, though it's for Odoo 12: https://github.com/odoo/odoo/issues/27668
I tried upgrading my version of PDF.JS by essentially copying this PR: https://github.com/odoo/odoo/pull/49457 I made sure to restart Odoo, upgrade the web module & regenerate assets bundles, but neither of the versions I tried (2.2.228 & 2.9.359) behaved any differently.
I also tried the following snippet of code from the bottom of that Github issue:
<templates>
<t t-extend="DocumentViewer.Content">
<t t-jquery="iframe.o_viewer_pdf" t-operation="replace">
<iframe class="mb48 o_viewer_pdf" t-if="widget.activeAttachment.type == 'application/pdf'" t-attf-src="/web/content/#{widget.activeAttachment.id}" />
</t>
</t>
</templates>
According to the user who posted it, this code is supposed to override PDF.JS and use the browser's default PDF viewer. I tried putting this code in an XML file in a custom module (tried loading it both as 'data' & 'qweb' from manifest.py), but saw no effects.
If anyone has faced this issue before, or just has any ideas I haven't tried, I would greatly appreciate some help!