Skip to content

[Bug]: Decimal coordinate calculation #19987

Open
@SehoAhn

Description

@SehoAhn

Attach (recommended) or Link to PDF file

sample.pdf

Web browser and its version

Chrome(latest)

Operating system and its version

Windows11

PDF.js version

5.3.31

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

Yes

Is a browser extension

No

Steps to reproduce the problem

Open the attached PDF file with PDF.js

What is the expected behavior?

The PDF file contains two squares that are stuck together with no space between them,
making it appear as a single rectangle.
Adobe Acrobat Reader and Chrome's default PDF viewer render it as expected:

Image

What went wrong?

When viewed in the PDF.js viewer, there is a gap between the two squares, making it appear as if there is a white line:

Image

Link to a viewer

No response

Additional context

MediaBox value:

0 0 300.5 300.5

Sqaure object value:

0.11765 0.11765 0.11765 rg
50 50 100 100 re
f
0.11765 0.11765 0.11765 rg
50 150 100 100 re
f

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions