GroupDocs.Annotation allows you to extract annotations from a document and serialize them to the XML format.
To do this, follow these steps:
Instantiate the Annotator class. Specify the input document path or stream.
Instantiate the LoadOptions class and set ImportAnnotation = true.
Define a variable of the List<AnnotationBase> type.
Call the get() method to get result to variable defined on the previous step.
Instantiate the XmlSerializer class with the List<AnnotationBase> type.
Using FileStreamobject, serialize annotations to the file.
The following code snippet shows how to extract annotations from a document:
// This example demonstrates how to extract annotations.
LoadOptionstmp0=newLoadOptions();// Create an instance of Annotator class
Annotatorannotator=newAnnotator("InputPath",tmp0);// Get all annotations
List<AnnotationBase>annotations=annotator.get();
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.