Annotating would not be complete without a discussion of the marked content. Annotations in PDFs allows users to reply to an annotation. A reply is actually just another annotation behind the scenes, specifically a Sticky Note annotation.
Reading replies
Since replies are just Sticky Note annotations, they can be found in the annotation list provided by the AnnotationManager. We can leverage the isReply API on annotations to differentiate from other annotations. Annotations in WebViewer are also aware of their replies which we can get using getReplies.
Creating replies through the AnnotationManager is made easy with the createAnnotationReply API. You only need the annotation you are replying to as well as the reply text.
Since replies are just annotations, deleting replies is the same as deleting an annotation with the annotation manager.
Events
addReply
When a reply is added, the addReply event will be triggered on the AnnotationManager. This may be helpful in sending notifications when a reply is added.
Suppose we wanted to programmatically have a reply letting the user know that a comment was deleted from the parent annotation. This can be achieved by using the createAnnotationReply method along with the deleteReply listener.