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
Wrong gradient transform #7847
Labels
Comments
brendandahl
added a commit
to brendandahl/pdf.js
that referenced
this issue
May 11, 2021
Previously, we set the base transformation and pattern matrix directly to the main rendering ctx of the page, however doing this caused the current transform to be lost. This would cause issues with things like shear missing so the pattern was misaligned or when stroke was used the scale of the line width or dash would be wrong. Instead we should leave the current transform and use setTransfrom on the pattern so it is applied correctly. For axial and radial shadings I had to create a temporary canvas to draw the shading so I could in turn use setTransform. Fixes: mozilla#13325, mozilla#6769, mozilla#7847, mozilla#11018, mozilla#11597 The following already in the corpus are improved: issue8078-page1 issue1877-page1
brendandahl
added a commit
to brendandahl/pdf.js
that referenced
this issue
May 11, 2021
Previously, we set the base transformation and pattern matrix directly to the main rendering ctx of the page, however doing this caused the current transform to be lost. This would cause issues with things like shear missing so the pattern was misaligned or when stroke was used the scale of the line width or dash would be wrong. Instead we should leave the current transform and use setTransfrom on the pattern so it is applied correctly. For axial and radial shadings I had to create a temporary canvas to draw the shading so I could in turn use setTransform. Fixes: mozilla#13325, mozilla#6769, mozilla#7847, mozilla#11018, mozilla#11597, mozilla#11473 The following already in the corpus are improved: issue8078-page1 issue1877-page1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm sorry if it's a duplicate, I found lots of issues with gradients but none of the open ones looks similar.
It's apparently the PDF code
/Matrix [440 0 0 -200 20 220]
(line 44 in both files) that causes the problem.Configuration:
Steps to reproduce the problem:
Open attached files:
radial.pdf
linear.pdf
What is the expected behavior? (Adobe Reader 11)
What went wrong? (mozilla.github.io/pdf.js/web/viewer.html)
Gradients aren't correctly transformed
The text was updated successfully, but these errors were encountered: