Open Bug 1693132 Opened 3 years ago Updated 22 hours ago

Google Docs' server-side PDF printing doesn't get triggered if you have a doc-within-a-doc "preview" of a second google-doc open

Categories

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

Firefox 92

Tracking

(firefox92 affected, firefox104 affected, firefox111 affected)

ASSIGNED
Tracking Status
firefox92 --- affected
firefox104 --- affected
firefox111 --- affected

People

(Reporter: dholbert, Assigned: twisniewski)

References

()

Details

(Keywords: webcompat:needs-diagnosis, webcompat:site-wait)

User Story

platform:windows,mac,linux
impact:feature-broken
configuration:general
affects:some

Attachments

(6 files, 1 obsolete file)

STR:

  1. View this Google Doc:
    https://docs.google.com/document/d/1jsCkQvHQIikdbouJRYkBF_6-on-e1St9P1sRpX-OsNI/edit
  2. Click the link. After a second, this brings up a little context-menu, which hopefully includes a large "open preview" clickable area, with a little picture-in-picture icon. [See screenshot -- you might need to have edit permissions in order for this area to be there, maybe? I'm not sure.]
  3. Click the large "open preview" area in that context-menu.
  4. After the preview opens, press Ctrl+P

ACTUAL RESULTS:
Firefox's actual print dialog appears, with a print preview rendering of the "main" gdocs document you were viewing (not the tiny previewed one)

EXPECTED RESULTS:
Google Docs should've given us a server-side PDF printout of the document, as they do if you simply do Ctrl+P right after loading the document in the first place.

(Note: eventually we do want to use our native print support with google docs, but there are some missing features that don't make that work great just yet; so for now, we still want the PDF print pipeline, and this inconsistency is an issue.)

Note: I'm not sure if the google docs "open preview" UI opens for everyone -- I see it in a regular browser tab where I'm logged in to gmail, but I don't see it in a Private Browsing window where I'm not logged in. (In that window, I just get the top strip of the context-menu, with the doc title and the copy icon)

(Perhaps you need write access to the doc in order to see the "open preview" UI and to trigger this bug; not sure.)

Needs Triage.

Flags: needinfo?(raul.bucata)
Flags: needinfo?(oana.arbuzov)

Both Firefox and Chome, trigger the "Print" preview window, displaying the main doc content.
https://prnt.sc/1bswb5t

Tested with:
Browser / Version: Firefox Nightly 92.0a1 (2021-07-15), Chrome 91.0.4472.124
Operating System: Windows 10 Pro

Daniel Holbert do you get a different behavior on Chrome?

Flags: needinfo?(raul.bucata)
Flags: needinfo?(oana.arbuzov)
Flags: needinfo?(dholbert)
Priority: -- → P3
Version: unspecified → Firefox 92

(In reply to Oana Arbuzov [:oanaarbuzov] from comment #4)

Both Firefox and Chome, trigger the "Print" preview window

That's not what's supposed to happen in Firefox, though.

For comparison, try these STR:
(1) Load the same doc ( https://docs.google.com/document/d/1jsCkQvHQIikdbouJRYkBF_6-on-e1St9P1sRpX-OsNI/edit )
(2) Wait for the doc to finish loading (give it 10-15 seconds)
(3) Ctrl+P

This is expected to produce different behavior in Firefox and Chrome right now. In Firefox, it triggers a PDF file to be generated on the server-side and downloaded; whereas in Chrome, it triggers their print preview UI. This difference is expected & intentional for now; see bug 1521655. (Once we've fixed the dependent bugs there, we can ask the gdocs team to give us the same experience as chrome.)

But right now, if you perform the additional steps from comment 0, Firefox unexpectedly triggers the print-preview UI (i.e. gets the same experience as Chrome, which may produce unexpected issues since we don't yet support some print layout features that google docs relies on). That's the issue here -- Google Docs intends to intercept Ctrl-P and generate a PDF for us, but in this particular case they do not.

Flags: needinfo?(dholbert)

I wonder if it's a windows only issue, because if I do Command+P on the mac I get the right behavior.
Or has Google changed its behavior on Windows too?

Flags: needinfo?(dholbert)

I can still reproduce on Linux (haven't tested other platforms today). I got Firefox's own Print dialog, with a print-preview of some broken-looking content.

I suspect you weren't actually viewing a "Google Docs embedded preview" (not sure if that's the right name) when you did Ctrl+P -- that part is important. See attached screenshot for what that looks like. The little popup on the right is what I'm calling the "embedded preview", and it's spawned when you click the appropriate button in the link's context-menu (which opens when you place the text-cursor in the link).

In order for that option to be available (i.e. in order for the proper context menu to appear when you put your cursor inside the link), you need to be signed in to your Google Account. I see a "sign in" button at the top right of your screenshot, so I suspect that's what blocked you from getting far enough in the STR to trigger the bug.

Can you reproduce if you sign in and open the "embedded preview" before doing Ctrl+P?

Flags: needinfo?(dholbert) → needinfo?(kdubost)

Ah the preview is active only when you are sign-in into Google.
And indeed Command+P, when embedded Preview is on, generates a print menu.

but fwiw I get the same thing on macOS

  • in latest Edge Blink Canary
  • in latest Safari Tech Preview
Flags: needinfo?(kdubost)

(In reply to Karl Dubost💡 :karlcow from comment #8)

but fwiw I get the same thing on macOS

  • in latest Edge Blink Canary
  • in latest Safari Tech Preview

By "the same thing" you mean a print menu, right?

That's the expected, in WebKit/Blink-based browsers, for which Google Docs printing "just works". It doesn't "just work" in Firefox, though, as shown by the print-preview rendering in my screenshot in comment 2 (notice the weird horizontal line across the page).

We're ultimately fixing that in bug 1521655, but in the meantime, Google Docs intends to only feed us server-side-generated PDF files for "print" actions. This bug is just documenting one case where they're accidentally not doing that.

Ah! So on my screenshot in comment #8

  • Working == brings the print menu
  • That said Blink Edge is failing to show anything (at least for the time I tried)

Contacted Google about it.

Current behavior on Firefox still gives a print preview of the main document.
https://prnt.sc/eTSgH9O8txG4

Current behavior on Chrome - it gives a print preview of the main document and in the background is shows an error "Unable to load file" for the tiny preview one.
https://prnt.sc/uVno7WYaCYmU

Tested with:
Browser / Version: Firefox Nightly 104.0a1 (2022-06-28)
Operating System: Windows 10 Pro

Current behaviour Firefox vs Chrome. On Firefox it opens the doc in a new tab and it gets downloaded and on Chrome the prin preview is shown.

Tested on:
Operating system: Windows 10
Browser/Version: Nightly 111.0a1 (2023-01-19) / Chrome 109.0.5414.75

Assignee: nobody → twisniewski
Status: NEW → ASSIGNED
Attachment #9385282 - Attachment is obsolete: true
Severity: -- → S4
User Story: (updated)
Priority: P3 → P2

This might be becoming irrelevant, now that we're on the verge of getting "native" print behavior from Google Docs via bug 1521655 (matching the Chrome flow described in comment 5).

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

Attachment

General

Created:
Updated:
Size: