Skip to content

[Bug]: PolygonAnnotation fill not rendered (only outline) in PDF.js web viewer, but works in Acrobat and Edge #20062

Closed
@SWETzero

Description

@SWETzero

Attach (recommended) or Link to PDF file

document.pdf

Web browser and its version

Edge-138.0.3351.65

Operating system and its version

Win11- 26100.4349

PDF.js version

5.3.93

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

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Create a PDF with a PolygonAnnotation that has both a stroke and a fill color (libraries(https://github.com/highkite/pdfAnnotate)).(The pdf uploaded)
  2. Open the PDF in the PDF.js web viewer.
  3. Observe that only the polygon's outline is visible, with no fill.
  4. Open the same PDF in Acrobat or Edge and observe that the polygon is correctly filled.

What is the expected behavior?

Expected behavior
The polygon annotation should be rendered with both its outline and fill color, consistent with Acrobat and Edge.
Acrobat:
Image
Edge:

Image

What went wrong?

When displaying a PDF containing PolygonAnnotation (with fill color) using the PDF.js web viewer, only the outline of the polygon is rendered. The fill color is missing. However, the same PDF displays correctly (with both fill and outline) in Adobe Acrobat and Microsoft Edge's built-in PDF viewer.

Link to a viewer

No response

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions