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

Rendering Issue in Chrome: Lose some green dots in rendering one PDF exported from AutoCAD #12810

Closed
ahwyX100 opened this issue Jan 4, 2021 · 2 comments
Assignees
Labels

Comments

@ahwyX100
Copy link

ahwyX100 commented Jan 4, 2021

[Attach](url
Test1.pdf
)

Configuration:

  • Browser: Chrome 87.0.4280.88
  • OS: MacOS 10.15.4
  • PDF.js version: 2.5.207

Steps to reproduce the problem:

  1. Open the viewer.html in above pdf.js package
  2. Open the attached Test1.pdf in the viewer.html

What is the expected behavior? (add screenshot)
All contents should be rendered properly, just like the attached right.png
right

What went wrong?
Some green dots in left side are lost, as highlighted in the wrong.png. And this issue only exists in the Chrome browser, it renders properly in safari and Firefox.
wrong

@Snuffleupagus
Copy link
Collaborator

And this issue only exists in the Chrome browser, it renders properly in safari and Firefox.

That clearly points to a canvas-related bug in Chrome, rather than in the PDF.js library, and as such there's unfortunately nothing that can be done about this here.

@ahwyX100
Copy link
Author

ahwyX100 commented Jan 4, 2021

And this issue only exists in the Chrome browser, it renders properly in safari and Firefox.

That clearly points to a canvas-related bug in Chrome, rather than in the PDF.js library, and as such there's unfortunately nothing that can be done about this here.

But it works fine here in Chrome . I opened the same file and by inspecting the element it renders the content in the canvas as well.

@calixteman calixteman self-assigned this Jan 10, 2021
calixteman added a commit to calixteman/pdf.js that referenced this issue Jan 10, 2021
 * add a comment to explain how minimal linewidth is computed.
 * when context.linewidth < 1 after transform, firefox and chrome
   don't render in the same way (issue mozilla#12810).
 * set lineWidth to 1 after transform and before stroking
   - aims fix issue mozilla#12295
   - a pixel can be transformed into a rectangle with both heights < 1.
     A single rescale leads to a rectangle with dim equals to 1 and
     the other to something greater than 1.
 * change the way to render rectangle with null dimensions:
   - right now we rely on the lineWidth set before "re" but
     it can be set after "re" and before "S" and in this case the rendering
     will be wrong.
   - render such rectangles as a single line.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants