Update annotation replies

GroupDocs.Annotation provides and ability to programmatically update annotation replies by accessing them by their index inside Replies collection.

Here is a steps to update annotation reply (considered that we already have some reply added to annotation)

  • Instantiate Annotator object with input document path or stream;
  • Call Get method of Annotator object and obtain collection of document annotations;
  • Access desired reply object inside Replies collection by its index (zero-based) and update its properties as needed;
  • Call Update method of Annotator object with passed annotations;
  • Call Save method with resultant document path or stream and SaveOptions object;

The following code demonstrates 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

More resources

Advanced Usage Topics

To learn more about document annotating features, please refer to the advanced usage section.

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured .NET library we provide simple but powerful free Apps. You are welcome to annotate your PDF, DOC or DOCX, XLS or XLSX, PPT or PPTX, PNG and other documents with free to use online GroupDocs Annotation App.

© Aspose Pty Ltd 2001-2022. All Rights Reserved.