[Bug]: annotation icon colors don’t follow their specified color
Open
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
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
- Open
annotation-colors.pdf. - Open any text annotation.
What is the expected behavior?
As both Evince 48.1 and MuPDF-GL 1.27.2 display:
/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:
- Icon color should follow
/Cfrom/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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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