Remove annotation from document

On this page

GroupDocs.Annotation allows you to remove all previously added annotations. To do this, follow these steps:

  1. Instantiate the Annotator class. Specify the input document path or stream.
  2. Instantiate the SaveOptions class. Set AnnotationTypes = AnnotationType.None.
  3. Call the save() method. Specify the output document path or stream.

The following code snippet shows how to remove annotation using its index:

// This example demonstrates how to remove annotations from document.

// Create an instance of Annotator class
Annotator annotator = new Annotator("inputPath");

SaveOptions saveOptions = new SaveOptions();

// Save result to file"outputPath", saveOptions);

On this page