Can you reproduce using one of our samples or online demos?
Are you using the WebViewer server?
Does the issue only happen on certain browsers?
Is your issue related to a front-end framework?
Is your issue related to annotations? Yes
We have a use case in which we are programmatically generating text highlight annotations (i.e. similar to some of what is happening in this sample).
We would like to give users the ability to “navigate” through these generated annotations and approve/dismiss them in some way. “Approving” them would persist XML data to our database, analogous to how we handle user-triggered ANNOTATION_CHANGED events.
We are planning to build this functionality outside of WebViewer; however, I am curious if you have thoughts on whether or not this could be built within the WebViewer UI? Specifically, it would be interesting to leverage the “annotation note connector line” functionality that is exposed in the “Comments” sidebar:
Is any of this functionality composable in any way? Could we build out a custom sidebar within WebViewer?
If we were to build this outside of WebViewer, is there a way to programmatically navigate / select an annotation within the document viewer and/or programmatically select a comment (which has a line connecting to its annotation).
const highlightAnnot = new HighlightAnnotation();
instance.Core.annotationManager.jumpToAnnotation(highlightAnnot);
instance.Core.annotationManager.selectAnnotation(highlightAnnot);
instance.UI.openElement('notesPanel');
// user clicks accept/reject/etc
annotationManager.updateAnnotationState(highlightAnnot, 'Completed');
// save annotation's state to the database (or using the annotation XFDF)
Does this work for you?
Best regards,
Tyler Gordon
Web Development Support Engineer
PDFTron
@tgordon, one more tangentially related question: When deleting an annotation (via annotationPopup), the deleted annotation still seems to be in-memory via (annotationManager.getAnnotationsList). Is this expected and/or is there a way to retrieve the set of non-deleted annotations?