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

[Bug]: Issue with line thickness #19633

Closed
erikpassa opened this issue Mar 10, 2025 · 2 comments · Fixed by #19639
Closed

[Bug]: Issue with line thickness #19633

erikpassa opened this issue Mar 10, 2025 · 2 comments · Fixed by #19639
Assignees
Labels

Comments

@erikpassa
Copy link

erikpassa commented Mar 10, 2025

Attach (recommended) or Link to PDF file

Pagine estratte senza titolo.pdf

Web browser and its version

Chrome 134.0.6998.35

Operating system and its version

Windows 10 Pro 22H2

PDF.js version

4.10.38

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

In the online demo page load this PDF and you can see the problem.

What is the expected behavior?

The line thickness should be as on the original pdf

What went wrong?

The thickness line is wrong.

Image

Link to a viewer

No response

Additional context

No response

@calixteman
Copy link
Contributor

Here's a reduced test case:
issue19633.pdf

The problem is that the line thickness is negative when it should be a positive number or zero:

8.4.3.2 Line Width
The line width parameter specifies the thickness of the line used to stroke a path. It shall be a non-negative
number expressed in user space units; ...

@erikpassa
Copy link
Author

Thanks for the answer.
The problem is that we have a lot of PDF already done in the years and we cannot edit the files.
Is there a way to change this behaviour?

For example: if the there is a negative value change it with a default one?

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.

3 participants