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

PDF Render Issue in 2.3.200 #11597

Closed
blackmambahk opened this issue Feb 14, 2020 · 1 comment
Closed

PDF Render Issue in 2.3.200 #11597

blackmambahk opened this issue Feb 14, 2020 · 1 comment

Comments

@blackmambahk
Copy link

Attach (recommended) or Link to PDF file here:
CLIENT_TEST.pdf

Configuration:

  • Web browser and its version:Chrome 79.0.3945.130, Firefox 72.0.2
  • Operating system and its version:Windows 10
  • PDF.js version: 2.3.200
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Open the attached PDF,
  2. page 2 bottom left corner there is a callout with text "UV Blocking"
  3. Issue relates to the width of the border and the gradient color.

What is the expected behavior? (add screenshot)
In Acrobat the border is thin and the gradient fades from the center to left and right
In Firefox built in pdfjs the border is a little bit thicker and the gradient fades left to right
In our own app using 2.2.228 the border render the same as with FireFox builtin.
In our own app using 2.3.200 the border is very thick and fades left to right

What went wrong? (add screenshot)
PDF rendered differently between 2.3.200 and 2.2.228, border is double thickness

Link to a viewer (if hosted on a site other than mozilla.github.io/pdf.js or as Firefox/Chrome extension):

@janpe2
Copy link
Contributor

janpe2 commented Feb 18, 2020

Maybe a duplicate of #11018. A shading pattern is used as the "color" when a path is stroked.

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

No branches or pull requests

3 participants