Skip to content
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

Graphics problems on PDF in web viewer #13325

Closed
cbjerg opened this issue May 3, 2021 · 0 comments · Fixed by #13361
Closed

Graphics problems on PDF in web viewer #13325

cbjerg opened this issue May 3, 2021 · 0 comments · Fixed by #13361
Labels

Comments

@cbjerg
Copy link

cbjerg commented May 3, 2021

Attach (recommended) or Link to PDF file here:

Configuration:

  • Web browser and its version: Chrome 90.0.4430.93
  • Operating system and its version: macOs Big Sur 11.2.3
  • PDF.js version: 2.7.570
  • Is a browser extension: No

Steps to reproduce the problem:

  1. Load the attached pdf in https://mozilla.github.io/pdf.js/web/viewer.html
  2. Go to page 46. Dotted lines are missing in the graphics (see screenshot from acrobat reader)

What is the expected behavior? (add screenshot) See the screenshot
Technical_Guide_UK.pdf
Screenshot 2021-05-03 at 07 46 09

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
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants