PDF documents previewed via Printer icon are not displayed correctly
Categories
(Core :: Print Preview, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox80 | --- | unaffected |
firefox81 | --- | wontfix |
firefox82 | --- | fixed |
People
(Reporter: vlucaci, Assigned: emilio)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [print2020_v82] [old-ui-] )
Attachments
(2 files)
Affected versions
- 81.0b8
- 82.0a1 (2020-09-10)
Affected platforms
- Windows 10x64
- Ubuntu 18.04
- macOS 10.14
Steps to reproduce
- Launch FF.
- Go to http://pdf995.com/samples/pdf.pdf
- Print preview the page via burger menu or CTRL+P
- Close the PP modal.
- Click on the PDF Print button.
Expected result
- Document is displayed in the same way in .js module as it is presented in Print Preview.
Actual result
- Document opened in pdf.js module displays pages randomly(sometimes inverted, sometimes zoomed in, sometimes zoomed out, etc)
Suggested Severity
- Seeing as how this issue only occurs with this specific document, I would suggest an S3
Regression range
- Will return with regression ASAP
Additional notes
- Did not manage to reproduce this issue with other pdf documents.
- This issue does not occur for the old UI.
Reporter | ||
Comment 1•4 years ago
|
||
I was unable to narrow the regression down even more than :
I suspect 1661627 is the culprit here. Hiro, could you take a look?
Updated•4 years ago
|
Comment 2•4 years ago
|
||
I think this is caused by the same root cause of bug 1663448.
Comment 3•4 years ago
•
|
||
Emilio is totally right (as in bug 1663448 comment 4).
In this pdf case, there remain stateStack
when endDrawing is called from cancel().
for (let i = this.stateStack.length; i > 0; i--) {
this.restore();
}
I've confirmed that adding above code in endDrawing fixes this case and bug 1663448, but I am totally unsure about the relationship between stateStack
and this.current.activeSMask
(mask operations).
Brendan, can you please take care of this bug, or tell me what the right approach to fix this bug? Thanks!
Assignee | ||
Comment 4•4 years ago
|
||
Whatever that state is restoring, this function should clear it to. Probably the transform matrix should be set to an identity.
Assignee | ||
Comment 5•4 years ago
•
|
||
Probably just calling ctx.resetTransform()
should do.
Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
Should be fixed by bug 1665812.
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Description
•