print preview sometimes not rendering content, print contains it
Categories
(Core :: Print Preview, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox80 | --- | unaffected |
firefox81 | + | fixed |
firefox82 | + | fixed |
People
(Reporter: aryx, Unassigned)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
(deleted),
image/png
|
Details |
Some PDF content doesn't get shown in print preview. It's shown in the print and in the PDF viewer. Both PDF files for which I noticed the issue are not public but one is my MoCo payslip (the "LOHN" one). Because Emilio has access to similar documents, maybe he can reproduce the issue? Page 2 is always affected, page 3 sometimes. The tables are getting cut off in a row and nothing gets rendered below on the page.
For another document which I could share with MoCo employees, the first two pages don't get rendered and toggling the printing of backgrounds doesn't change anything.
Reporter | ||
Comment 1•4 years ago
|
||
Reporter | ||
Comment 2•4 years ago
|
||
This can be often reproduced with page 3 of https://5essexcourt.co.uk/images/uploads/misc/5_Essex_Court_Pupillage_Application_Round_2018.pdf which is shown as blank in these cases.
Reporter | ||
Comment 3•4 years ago
|
||
Not reproducible with Nightly on Windows 10 (10 attempts).
Reporter | ||
Comment 4•4 years ago
|
||
Bisection for the blank page issue points to bug 1636728 as regressor.
Updated•4 years ago
|
Comment 5•4 years ago
|
||
I also couldn't reproduce on Linux, nor Mac.
I pondered a bit about whether reusing the print preview document meant that some state related to the print callback ended up being messed up, but I don't think that can't happen... So I suspect it's some sort of canvas bug, but...
Comment 6•4 years ago
|
||
Nical, do you know of 2d-canvas specific codepaths in Win8 or such which could explain this? (For reference, printing a pdf with pdf.js uses the .mozPrintCallback
API which effectively just gives you a context to render into).
Updated•4 years ago
|
Updated•4 years ago
|
Comment 7•4 years ago
|
||
It looks like PDF.js is supposed that mozPrintCallbacks are called between beforeprint and afterprint? But now the callback is called after the afterprint event.
Comment 8•4 years ago
|
||
It's been over a year since we stopped doing that though. Since https://phabricator.services.mozilla.com/D34280 we've dispatched the events directly before and after the original clone operation.
Comment 9•4 years ago
|
||
It just landed two month ago, right?
Comment 10•4 years ago
|
||
Oh, wow. There was a long gap between me writing that patch and landing it.
Anyway, it landed for v80, but we're blaming bug 1636728 which landed for v82 Nightly. I'm just trying to say that PDF.js assuming that mozPrintCallbacks are called between beforeprint and afterprint isn't the only factor here (not that you said that). :-)
At any rate, I believe emilio has now reproduced the issue and tracked it down to something to do with the new event loop spinning that his patch does.
Comment 11•4 years ago
|
||
A similar issue, bug 1661222 was reported before bug 1636728, and I believe these are caused by the same root cause. Anyways, I agree that firing mozPrintCallback is not the only one factor, I think there are multiple timing specific issues.
Comment 12•4 years ago
|
||
Yeah, this is timing-dependent, see bug 1662426 comment 7 for the gory details. Sorry for the noise nical.
I have a try run there which needs some minor pdf.js changes.
Comment 13•4 years ago
|
||
:emilio, is bug 1661222 a dupe of this?
Comment 14•4 years ago
|
||
I think so.
Comment 17•4 years ago
|
||
Yes, I think the patch in bug 1662426 should fix this, but I couldn't reproduce this exact error so I've asked Aryx to confirm there.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•