Failed to display annotations with popup
- Langage dominant
- TypeScript
- Étoiles
- 395
- Forks
- 39
- Merge moyen
- 7 h 7 min
- PR mergées (30 j)
- 12
Description
I really appreciate the work and have enjoyed using it so far.
However, I was wondering if there's a built-in feature to display PDF annotations, including notes (displayed as a popup next to the hightlighted text when user hovering), similar to other PDF viewers like react-pdf and react-pdf-viewer. Is this already supported, or would a custom implementation be required?
**Update**:
After investigating, I found some misimplementations in the creation of the `LinkService` within the `useAnnotationLayer` hook. The `usePDFLinkService` always returns an `undefined` instance, which prevents the `AnnotationLayer` of pdfjs from rendering the popup.
As a workaround, I created a new `LinkService` instance directly within the `useAnnotationLayer` hook, and everything seems to be working as expected.
` const linkService = useRef(new LinkService());`
Please let me know if I’m misunderstanding anything or if there’s a better approach to address this issue.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.