mozilla / mozilla/pdf.js

[Bug]: annotation icon colors don’t follow their specified color

Open
#20,938 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

annotations
Dominant language
JavaScript
Stars
53.9k
Forks
10.7k
Avg merge
18h 38m
Merged PRs (30d)
130

Description

Attach (recommended) or Link to PDF file

annotation-colors.pdf

Web browser and its version

Firefox 148.0.2

Operating system and its version

Fedora 43

PDF.js version

The one that comes with the browser

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

Yes

Is a browser extension

No

Steps to reproduce the problem
  1. Open annotation-colors.pdf.
  2. Open any text annotation.
What is the expected behavior?

As both Evince 48.1 and MuPDF-GL 1.27.2 display:

Image Image

/C in /Annot defines (as described in PDF-1.7 specification):

  • The background of the annotation’s icon when closed
  • The title bar of the annotation’s pop-up window
What went wrong?

From https://mozilla.github.io/pdf.js/web/viewer.html:

Image
  • Icon color should follow /C from /Annot.
  • Window background color is only related to the title (subject), not to text.
Link to a viewer

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with annotation-colors.pdf in the PDF.js viewer at web/viewer.html, comparing the annotation icon and popup colors with the /C value and the cited viewers. Trace the annotation rendering entry points reached by that reproduction; done when the icon and popup title bar follow the specified color behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.