Closed Bug 1618371 Opened 4 years ago Closed 4 years ago

Printing PDFs from Preview in Outlook 365 OWA broken after latest Firefox update

Categories

(Web Compatibility :: Site Reports, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rgilmore, Unassigned)

References

()

Details

(Keywords: webcompat:site-wait, Whiteboard: [layout:print-triage:p2])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:73.0) Gecko/20100101 Firefox/73.0

Steps to reproduce:

Open an email in Outlook OWA. Click on a PDF attachment to preview it in the browser. Press the Print button.

Actual results:

Nothing happens.

Expected results:

A print dialogue should open so the user can select a printer and print the PDF.

This has been tested on all of our computers in the company and the result is the same for everyone (nothing happens).
Performing this same action in Google Chrome produces the expected results (PDF will print).
This problem started right after the latest Firefox update and only appears to affect PDF files.

Summary: Printing PDFs from Preview in Outlook 365 OWA broken after latest update → Printing PDFs from Preview in Outlook 365 OWA broken after latest Firefox update

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Printing: Output
Product: Firefox → Core

Thanks for filing this bug. From your description this sounds like a regression. I don't have access to a Outlook 365 OWA account, but perhaps someone else who can investigate the regression window does.

Also cc'ing jwatt, in case he's aware of recent printing-related changes that might be relevant.

Bugbug thinks this bug is a regression, but please revert this change in case of error.

Keywords: regression

It seems that this issue is not a regression, I can reproduce it way back to Fx 52.0a1 (even older builds are either broken, or the site is not supported). I can also confirm the issue is not reproducible on Chrome.

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Whiteboard: [layout:print-triage:p2]

Hello all, new to Bugzilla.

We are experiencing this issue in our organization for all users. When attempting to preview a PDF, the print button does nothing. There is also no download button anymore.

Everything works properly in Chrome. We tried a few previous versions and experienced the same issue. Let me know if I can provide more details.

The priority flag is not set for this bug.
:jwatt, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jwatt)

We've got a report in https://github.com/webcompat/web-bugs/issues/49932

When attempting to print pdfJsPrint() is called in PreviewPane component:

 function PreviewPane(props: PreviewPaneProps, ref: React.Ref<PreviewPaneHandle>) {
        React.useImperativeHandle(
            ref,
            () => ({
                ...
                ...
                pdfJsPrint() {
                    if (pdfJsPreview.current) {
                        pdfJsPreview.current.print();
                    }
                },
            }),
            []
        );

Doesn't seem like pdfJsPreview ref is working as expected as pdfJsPreview.current is undefined
in this condition:

if (pdfJsPreview.current) {
     pdfJsPreview.current.print();
}

This component is getting the ref:

const imagePreview = React.useRef<ImagePreviewHandle>();
const pdfJsPreview = React.useRef<PdfJsPreviewPrintable>();
const renderPreviewContent = () => {
            const className = styles.contentPreview;
            switch (props.viewState.previewPane.mode) {
              ...
                case PreviewPaneMode.PdfJs:
                    return (
                        <PdfJsPreview
                            className={className}
                            onError={onError}
                            onLoad={onLoad}
                            viewState={props.viewState.previewPane}
                            ref={pdfJsPreview}
                        />
                    );
            ...
            }
        };

and the following function is responsible for initiating printing, however it never gets here:

    function PdfJsPreview(props: PdfJsPreviewProps, ref: React.Ref<PdfJsPreviewPrintable>) {
        React.useImperativeHandle(
            ref,
            () => ({
                print() {
                    printPdf(currentPdf.current, viewer.current);
                },
            }),
            []
        );

Seems to be that missing ref is the reason, I'll investigate further

I've reached out to the Office team to see if they can look into investigating the issue

Update: Outlook team is looking into fixing the problem

Ksenia, so this is an issue on Outlook?

Flags: needinfo?(kberezina)

Hi Hiro, Microsoft has implemented its own PDF preview overlay on outlook.live.com and outlook.office.com, rather than passing PDFs to Firefox to open in Firefox's built-in PDF viewer. The print button for the PDF is calling code hosted by Microsoft instead of Firefox code. That is the code which is not working.

Yeah, as :jscher2000 mentioned, the issue is with custom PDF viewer on Outlook side. I believe they have a fix, however not sure when it'll make it to production.

Flags: needinfo?(kberezina)
Flags: needinfo?(jwatt)

Thank you, both. Moving into Web Compatibility.

Component: Printing: Output → Desktop
Product: Core → Web Compatibility
Version: 73 Branch → unspecified
Priority: -- → P1

This is now working, clicking on "Print" triggers printing dialog

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Thank you to everyone that looked into this!

You need to log in before you can comment on or make changes to this bug.