Update annotation replies

On this page

GroupDocs.Annotation allows you to update annotation replies by accessing them using the Replies collection.

To update annotation replies, follow these steps:

  1. Instantiate the Annotator class. Specify the input document path or stream.
  2. Call the Get method of the Annotator class to get collection of the document annotations.
  3. Access a reply object in the Replies collection using its index (zero-based) and update its properties.
  4. Call the Update method of the Annotator class. Specify annotations.
  5. Call the Save method. Specify the output document path or stream and the SaveOptions class.

The following code snippet shows how to update reply by index: 

// NOTE: Input document already contain annotations with replies
using (Annotator annotator = new Annotator("result.pdf"))
	// Obtain annotations collection from document
	List<AnnotationBase> annotations = annotator.Get();
	// Update first annotation first reply
	annotations[0].Replies[0].Comment = "Updated reply";
	// Save changes

On this page