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

Line drawing (Page 16) does not have the correct line thickness when using the demo application on Google Chrome or any brower #12295

Closed
Marsrobot2008 opened this issue Aug 27, 2020 · 2 comments
Assignees
Labels

Comments

@Marsrobot2008
Copy link

Steps to reproduce the problem:

  1. When using the demo application - https://mozilla.github.io/pdf.js/web/viewer.html, load the document 5311693-1.pdf

5311693-1.pdf

  1. go to Page 16 of the document.

  2. The strip of EKG data appears to have an incorrect line width under the Multi-color heat rate chart.

  3. When the same document is generated by pdffactory , the artifact are not visible.

What is the expected behavior? (add screenshot)
expected

What went wrong? (add screenshot)
The EKG line strip has an incorrect thickness. the x-transform seems to stretch the line thickness. See the stri in the RED rectagngle of the attached behavior versus the GREEN rectangle

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

@THausherr
Copy link
Contributor

I hope that Halima A. agreed to have her cardio health data in this ticket!

@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.
@janpe2
Copy link
Contributor

janpe2 commented Jan 15, 2021

This issue has been fixed by pull request #12812

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

6 participants
@timvandermeij @Marsrobot2008 @calixteman @THausherr @janpe2 and others