# Extract annotations from document The page describes how to extract annotations from document when collaborate, edit and annotate documents using GroupDocs.Annotation for .NET. [GroupDocs.Annotation](https://products.groupdocs.com/annotation/net) allows you to extract annotations from a document and serialize them to the XML format. To do this, follow these steps: 1. Instantiate the [Annotator](https://reference.groupdocs.com/net/annotation/groupdocs.annotation/annotator) class. Specify the input document path or stream. 2. Instantiate the [LoadOptions](https://reference.groupdocs.com/net/annotation/groupdocs.annotation.options/loadoptions) class and set `ImportAnnotation = true`. 3. Define a variable of the `List` type. 4. Call the [Get](https://reference.groupdocs.com/net/annotation/groupdocs.annotation/annotator/methods/get) method to get result to variable defined on the previous step. 5. Instantiate the `XmlSerializer` class with the `List` type. 6. Using `FileStream` object, serialize annotations to the file. The following code snippet shows how to extract annotations from a document: {{< tabs "example1">}} {{< tab "C#" >}} ```csharp // for using this example input file ("annotated.pdf") must have annotations using (Annotator annotator = new Annotator("annotated.pdf")) { List annotations = annotator.Get(); XmlSerializer formatter = new XmlSerializer(typeof(List)); using (FileStream fs = new FileStream("annotations.xml", FileMode.Create)) { fs.SetLength(0); formatter.Serialize(fs, annotations); } } ``` {{< /tab >}} {{< /tabs >}}