Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing from Google web apps (Docs, Sheets, etc) saves to PDF instead of opening print dialog #3694

Closed
Brave-Matt opened this issue Mar 12, 2019 · 10 comments · Fixed by brave/brave-core#2342
Assignees

Comments

@Brave-Matt
Copy link

Brave-Matt commented Mar 12, 2019

Test plan

See brave/brave-core#2342

Description

Haven't run into this on any other sites, but when trying to print from Google Docs, Sheets, Slides ,etc, Brave offers to save this file as a PDF, rather than open the print dialog as expected. This happens with Shields up or down and can reproduced on Linux, macOS and Windows 10.

Steps to Reproduce

  1. Visit google Sheets or any google app in Brave
  2. Try to print sheet content to a home or office printer (or at all)
  3. Follow the in-browser dialog, click Next

Actual result/Expected

Brave tries to save content as PDF//Should launch print system dialog
print

Reproduces how often:

Always

Brave version (brave://version info)

Happens on all Brave release channels
v0.60.48
v0.61.13
v0.63.4

Website problems only:

  • Does the issue resolve itself when disabling Brave Shields? No
  • Is the issue reproducible on the latest version of Chrome? No

Additional Information

2 users reporting:
https://community.brave.com/t/brave-browser-problem-google-sheets-internal-print-function-instead-of-opening-printer-downloads-sheet-automatically-as-pdf-bug/33193

@rebron
Copy link
Collaborator

rebron commented Mar 12, 2019

cc: @fmarier pdfium related?

@yodaross

This comment was marked as abuse.

@rebron rebron added webcompat/not-shields-related Sites are breaking because of something other than Shields. extension/PDFJS labels Mar 14, 2019
@simonhong
Copy link
Member

I'm looking this.

@simonhong simonhong self-assigned this Mar 14, 2019
@simonhong
Copy link
Member

simonhong commented Mar 14, 2019

There is some difference between chrome and brave when click print button in docs.
After loading https://docs.google.com/presentation/d/1ou3qdnFhKdjR6gKZgDwx3YHDwVUF7y8eoqM3rhErMMQ/edit#slide=id.p, press print button.
Brave and chrome uses different request url.
Chrome: https://docs.google.com/presentation/d/1ou3qdnFhKdjR6gKZgDwx3YHDwVUF7y8eoqM3rhErMMQ/export/pdf?id=1ou3qdnFhKdjR6gKZgDwx3YHDwVUF7y8eoqM3rhErMMQ&pageid=p&attachment=false
Brave: https://docs.google.com/presentation/d/1ou3qdnFhKdjR6gKZgDwx3YHDwVUF7y8eoqM3rhErMMQ/export/pdf?id=1ou3qdnFhKdjR6gKZgDwx3YHDwVUF7y8eoqM3rhErMMQ&pageid=p

Brave doesn't have attachment=false query string. Who attach this additional query to docs url?
I think absence of this query leads downloading.

@simonhong
Copy link
Member

simonhong commented Mar 14, 2019

I found the root cause of this issue.
Google web apps checks Chrome PDF Viewer from navigator.plugins list.
Screen Shot 2019-03-14 at 22 05 03
If list includes Chrome PDF Viewer, it attaches more query strings like attachment=false.
Brave doesn't have Chrome PDF Viewer plugin.

@simonhong
Copy link
Member

simonhong commented Mar 14, 2019

Chromium build has same issue and fixed by changing plugin name from Chromium PDF Viewer to Chrome PDF Viewer in chrome/common/chrome_content_client_constants.cc.
So, I think absence of this plugin in brave caused this issue.

@btlechowski
Copy link

btlechowski commented Jul 30, 2019

Verification passed on

Brave 0.68.113 Chromium: 76.0.3809.62 (Official Build) beta (64-bit)
Revision 7b77856b3aa34d72f246d12340fc1ded8b2c0e83-refs/branch-heads/3809@{#798}
OS Windows 7 Service Pack 1 (Build 7601.24494)

Verified test plan from brave/brave-core#2342
PDF printed successfully.

Verification passed on

Brave 0.68.113 Chromium: 76.0.3809.62 (Official Build) beta (64-bit)
Revision 7b77856b3aa34d72f246d12340fc1ded8b2c0e83-refs/branch-heads/3809@{#798}
OS Linux
  • Verified print brings system print functionality instead of save file dialgoue

Verified passed with

Brave 0.68.114 Chromium: 76.0.3809.87 (Official Build) beta (64-bit)
Revision 111fe1e15d5ced26080a7dc239bcfe70f6c49aad-refs/branch-heads/3809@{#967}
OS Mac OS X
  • Verified test plan from Use pdfium brave-core#2342
  • Verified STR from description, file was printed instead of being prompted to save a PDF.

@andrew-pyle
Copy link

Brave user here. I have been printing successfully from Google Sheets in Brave in past months, but today, this issue seems to be happening again.

Instead of opening the Print dialog window, after the Next button, I get a PDF save automatically. Maybe Chromium has made some changes here?

Brave requested this URL after clicking the Next button: https://docs.google.com/spreadsheets/u/1/d/{id-omitted here}/pdf?id={id-omitted here}.

Clicking this button usually brings up the chrome print dialog.

Mentioning @simonhong because he troubleshot this problem successfully last year.

@SneakyLeif
Copy link

I’m running into the same exact issue. The only way to print a Google Sheets doc to a printer is to first export as PDF, and then print the PDF. Printing the PDF works fine in Brave, though! Very annoying.

Brave version:
Version 1.14.84 Chromium: 85.0.4183.121 (Official Build) (64-bit)

@linuxturtle
Copy link

This issue is still happening for me with the latest build on Linux.

Version 1.35.103 Chromium: 98.0.4758.102 (Official Build) (64-bit)](https://brave.com/latest/)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.