Printing from print button doesn't work.
Categories
(Toolkit :: Printing, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr78 | --- | unaffected |
firefox90 | --- | unaffected |
firefox91 | blocking | verified |
firefox92 | --- | verified |
People
(Reporter: calixte, Assigned: mstriemer)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
No problem when printing from ctrl+P
and no problem with a pdf without XFA.
Reporter | ||
Comment 1•4 years ago
|
||
:Snuffleupagus, would you have any idea here ?
Comment 2•4 years ago
•
|
||
(In reply to Calixte Denizet (:calixte) from comment #1)
:Snuffleupagus, would you have any idea here ?
I don't think that this is a PDF.js bug/regression, since then you'd expect that all ways of triggering printing would be equally broken and considering that the code-paths involved when clicking on the Print-button (in the PDF Viewer toolbar) hasn't changed recently.
Note that manually triggering window.print()
in the console, which is what that Print-button indirectly does, is also broken.
Running mozregression points to https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=36a1cc27b2645047fd2511b15ecf28a2838e3769&tochange=532840a9ae885348268858505f77fbac21e50caf, which suggests that this regressed in bug 1666247.
Updated•4 years ago
|
Updated•4 years ago
|
Reporter | ||
Comment 3•4 years ago
|
||
A STR:
- about:config and enableXfa set to true
- open the file: https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/imm1344e.pdf
- click on the print button.
It works as expected with "normal" pdfs.
For information, we inject a html to print in the xfa case:
https://github.com/mozilla/pdf.js/blob/4d130d066c3fb0786780eba6d2c809bb4ebad28d/web/firefox_print_service.js#L136
and we've few specific css rules:
https://github.com/mozilla/pdf.js/blob/4d130d066c3fb0786780eba6d2c809bb4ebad28d/web/viewer.css#L1847-L1857
:mstriemer, could you help here ?
If something is wrong on pdf.js' side, please tell me and we'll fix.
Comment 4•4 years ago
|
||
Additionally, the browser console shows:
AbortError: Actor 'PrintingSelection' destroyed before query 'PrintingSelection:HasSelection' was resolved print.js:190
init chrome://global/content/print.js:190
AsyncFunctionThrow self-hosted:696
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
So I don't really know why the actor is being destroyed, but I don't think we can use print selection only with window.print()
calls since the browser that we actually print is a preview browser clone of the webpage at the time of the window.print()
call rather than the original web content.
It's likely worth figuring out why this error is occurring, but this patch should resolve the issue.
Comment 7•4 years ago
|
||
Set release status flags based on info from the regressing bug 1666247
Updated•4 years ago
|
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Printing https://bug1720411.bmoattachments.org/attachment.cgi?id=9231160 also doesn't work, so it looks like this isn't restricted to XFA forms.
Comment 9•4 years ago
|
||
(In reply to Mark Striemer [:mstriemer] from comment #6)
So I don't really know why the actor is being destroyed, but I don't think we can use print selection only with
window.print()
calls since the browser that we actually print is a preview browser clone of the webpage at the time of thewindow.print()
call rather than the original web content.It's likely worth figuring out why this error is occurring, but this patch should resolve the issue.
Mark, did you mean to ask for review for your patch?
Updated•4 years ago
|
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
[Tracking Requested - why for this release]: Printing regression on pdfs.
Updated•4 years ago
|
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Assignee | ||
Comment 13•4 years ago
|
||
Comment on attachment 9230863 [details]
Bug 1720178 - Treat prints that error checking for selection as no selection r?sfoster
Beta/Release Uplift Approval Request
- User impact if declined: Pressing the Print icon in pdf.js results in a hung print dialog for some PDFs
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: No
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: See comment 3
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): This code was previously in a try/catch since it could fail, and that was erroneously changed. Patch returns the try/catch check
- String changes made/needed: None
Assignee | ||
Updated•4 years ago
|
Comment 14•4 years ago
|
||
(In reply to Sam Foster [:sfoster] (he/him) from comment #10)
I was not able to reproduce comment 8, but I can reproduce with comment 3.
I can only reproduce comment 8 intermittently.
Comment 15•4 years ago
|
||
bugherder |
Comment 16•4 years ago
|
||
Comment on attachment 9230863 [details]
Bug 1720178 - Treat prints that error checking for selection as no selection r?sfoster
Approved for 91 beta 6, thanks.
Comment 17•4 years ago
|
||
bugherder uplift |
Updated•4 years ago
|
Comment 18•4 years ago
|
||
Updated•4 years ago
|
Description
•