Odoo: [11.0] pdf.js can't print PDF files on Google Chrome

Created on 31 May 2018  路  3Comments  路  Source: odoo/odoo

Impacted versions:
11.0
Steps to reproduce:
With Google Chrome, go to Discuss, and send a message with a PDF file as an attachment.
Click on the PDF file, and try to print it (without downloading it)
Current behavior:
You can't print the PDF. With Ctrl+P, you got an error "Printing is not fully supported by this browser"
Expected behavior:
There should be a print icon
Video/Screenshot link (optional):
capture du 2018-05-30 10-22-24

It may be enough to update pdf.js ?

Since I send a lot of pdf files on discuss (and all my users using Chrome), I let the browser use its own viewer :

<?xml version="1.0" encoding="UTF-8"?>
<templates>

    <t t-extend="DocumentViewer.Content">
        <t t-jquery="iframe" 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>
11.0 Framework

Most helpful comment

@ged-odoo a recent version of pdf.js does not seem to have this problem. Can we consider upgrading the lib?
cf demo https://mozilla.github.io/pdf.js/web/viewer.html
I am not sure which version we have ourself but I wouldn't be surprise we still use the one back from website_slide merge.

All 3 comments

@ged-odoo a recent version of pdf.js does not seem to have this problem. Can we consider upgrading the lib?
cf demo https://mozilla.github.io/pdf.js/web/viewer.html
I am not sure which version we have ourself but I wouldn't be surprise we still use the one back from website_slide merge.

@ged-odoo I think there may be a problem with the version, I hope I can fix it.
In addition, I would like to ask, is there a plan to preview and print the report?
Currently, the printed reports are downloaded and then opened for printing, which is too cumbersome.

+1 requesting solution to this problem.

Was this page helpful?
0 / 5 - 0 ratings