The printing popup opens when opening some pdf files
Categories
(Firefox :: PDF Viewer, defect)
Tracking
()
People
(Reporter: u676766, Unassigned)
References
Details
(Whiteboard: [pdfjs-javascript])
Attachments
(1 file)
|
119.70 KB,
application/pdf
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 11.1; rv:84.0) Gecko/20100101 Firefox/84.0
Steps to reproduce:
Open the pdf attached to this bug report.
Actual results:
Immediately on opening, the printing modal opens as well.
Expected results:
The printing modal should not open.
Comment 1•5 years ago
|
||
Bugbug thinks this bug should belong to this component, but please revert this change in case of error.
Comment 2•5 years ago
|
||
Manage to reproduce the issue on Windows 10 x64, MacOS 10.15 and on Ubuntu 20.04 x64.
Comment 3•5 years ago
|
||
In this pdf there is script which must be ran when the document is opened:
this.print({bUI:true,bSilent:false,bShrinkToFit:true});
So it's the expected behaviour.
Comment 4•5 years ago
|
||
Anyway the implementation relies on window.print which can be disabled using a pref dom.enable_window_print.
And I just tested the pdf with Acrobat DC under Windows and the behaviour is the same.
Chrome and Safari do not have this behavior. If it was implemented like this on purpose maybe it should be challenged?
Comment 6•5 years ago
|
||
You can find the reason why we did that here:
https://bugzilla.mozilla.org/show_bug.cgi?id=843342
(In reply to Calixte Denizet (:calixte) from comment #6)
You can find the reason why we did that here:
https://bugzilla.mozilla.org/show_bug.cgi?id=843342
This was 8 years ago. I think it should be challenged again. Other browser do not behave like this.
Confirming this behaviour with Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0
But it also happen when opening the pdf with Adobe Acrobat, so as in Comment 3 mentioned it is a defined by a script in the pdf. So it should behave this way.
I suggest to close it as invalid.
Comment 9•4 years ago
|
||
Romain, what do you think the right behaviour should be here?
I would keep the current behaviour as it is consistent with Adobe Acrobat, though I understand the concern that this doesn't feel webby.
Comment 10•4 years ago
|
||
Is there a supported configuration where this could result in having the page print automatically (i.e a website can launch a print-out when serving a pdf document without user intervention)?
It seems this was supported on PDFium but then removed given they have a policy to open print dialogue following user gesture (https://bugs.chromium.org/p/chromium/issues/detail?id=968914) - useful thread https://stackoverflow.com/questions/57895126/chrome-77-not-auto-printing-pdfs: https://bugs.chromium.org/p/chromium/issues/detail?id=968914
I can trust that some websites rely on this feature although this is likely rare and declining fast if sites cannot rely on Chrome to work.
Overall I feel like this bug should be fixed in case it exposes users to potential threats, otherwise we should won't fix to avoid breaking existing (rare) sites that may have custom code for Firefox.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•