Which product are you using?
PDF.js Express Version
Detailed description of issue
I am adding multiple annotations to the PDF dynamically. The screen is divided into 2 parts. left part contains an HTML table containing annotation ids in it. The right part contains the pdf. If a user clicks on any annotation id in HTML table, the pdf view will scroll to that annotation in right section. So, its a kind of navigation for annotations.
Here’s what I am trying to do.
- Using annotationManager, I tried to find the annotation.
- Get X and Y of annotation.
- Translate that to webviewer coordinates using doc.getViewerCoordinates.
- Using scrollTo function to scroll to those coordinates.
This is working up to some extent, but when there is a Zoom, it does not work as expected. Can you please help me to write correct logic ?
Expected behaviour
Need to navigate to annotation so that it can be shown to the user. If the annotation is on 2nd page, then the view will scroll to 2nd page to that annotation and it will be visible to the user.
Does your issue happen with every document, or just one?
{Answer here}
Link to document
{Provide a link to the document in question if possible}
Code snippet
{Provide a relevant code snippet}