---
title: "Export XMP annotation data in C# .NET | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/annotations/export-xmp/"
md_url: "https://www.nutrient.io/guides/dotnet/annotations/export-xmp.md"
last_updated: "2026-05-14T21:57:26.856Z"
description: "Discover how to export XMP and PDF formats in .NET annotations with our comprehensive guide, complete with step-by-step instructions and examples."
---

# Export XMP annotation data in C# .NET

### XMP

[XMP](https://www.nutrient.io/guides/dotnet/annotations/export-xmp.md)

### PDF

[PDF](https://www.nutrient.io/guides/dotnet/annotations/export-pdf.md)

[XMP annotations](https://www.nutrient.io/guides/dotnet/annotations/xmp-annotations.md) can be stored in one of the following ways:

- XML file

- `Stream` object

- Base64-encoded string

To export XMP annotations from the currently opened file in the [`AnnotationManager` object](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager.html), use the [`SaveAnnotationsToXMP` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~SaveAnnotationsToXMP.html) for XML files and `Stream` objects, and the [`SaveAnnotationsToXMPBase64` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~SaveAnnotationsToXMPBase64.html) for the encoded string.

In the following example, the XMP annotations from a template image are applied to another image:

### C#

```csharp

using AnnotationManager annotationManager = new AnnotationManager();
// Load the template image to the `AnnotationManager` object.
annotationManager.InitFromFile(@"C:\temp\template.jpg");
// Save the annotations from the template image to an XML file.
annotationManager.SaveAnnotationsToXMP(@"C:\temp\annotTemplate.xml");
// Load the source image to the `AnnotationManager` object.
annotationManager.InitFromFile(@"C:\temp\source.jpg");
// Load the XML file with the annotations to the `AnnotationManager` object.
annotationManager.LoadAnnotationsFromXMP(@"C:\temp\annotTemplate.xml");
// Flatten the annotations into the image.
annotationManager.BurnAnnotationsToPage(false);
// Save the image to a file.
annotationManager.SaveDocumentToJPEG(@"C:\temp\output.jpg", 100);

```

### VB.NET

```vb

Using annotationManager As AnnotationManager = New AnnotationManager()
    ' Load the template image to the `AnnotationManager` object.
    annotationManager.InitFromFile("C:\temp\template.jpg")
    ' Save the annotations from the template image to an XML file.
    annotationManager.SaveAnnotationsToXMP("C:\temp\annotTemplate.xml")
    ' Load the source image to the `AnnotationManager` object.
    annotationManager.InitFromFile("C:\temp\source.jpg")
    ' Load the XML file with the annotations to the `AnnotationManager` object.
    annotationManager.LoadAnnotationsFromXMP("C:\temp\annotTemplate.xml")
    ' Flatten the annotations into the image.
    annotationManager.BurnAnnotationsToPage(False)
    ' Save the image to a file.
    annotationManager.SaveDocumentToJPEG("C:\temp\output.jpg", 100)
End Using

```

#### Used methods

- [`BurnAnnotationsToPage`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~BurnAnnotationsToPage.html)

- [`InitFromFile`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~InitFromFile.html)

- [`LoadAnnotationsFromXMP`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~LoadAnnotationsFromXMP.html)

- [`SaveAnnotationsToXMP`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~SaveAnnotationsToXMP.html)

- [`SaveDocumentToJPEG`](/api/gdpicture/GdPicture.NET.14.API~GdPicture14.AnnotationManager~SaveDocumentToJPEG.html)

#### Related topics

- [Load a file](/guides/dotnet/load-a-file.md)

- [Save a file](/guides/dotnet/save-a-file.md)
---

## Related pages

- [Annotate on images in C# .NET](/guides/dotnet/annotations/annotate-on-images.md)
- [Attach a file to an annotation in C#](/guides/dotnet/annotations/attach-a-file.md)
- [Create an annotation in a PDF using C#](/guides/dotnet/annotations/create.md)
- [Attach an image to an annotation in C#](/guides/dotnet/annotations/attach-an-image.md)
- [Custom annotations](/guides/dotnet/annotations/custom-annotations.md)
- [Edit PDF annotations in C#](/guides/dotnet/annotations/edit.md)
- [Export annotation data from PDFs in C# .NET](/guides/dotnet/annotations/export-pdf.md)
- [Flatten PDF annotations in C# .NET](/guides/dotnet/annotations/flatten.md)
- [Import XFDF annotation data to PDFs in C# .NET](/guides/dotnet/annotations/import-xfdf.md)
- [Get PDF annotation properties in C# .NET](/guides/dotnet/annotations/get-properties.md)
- [PDF annotations in C#.NET](/guides/dotnet/annotations.md)
- [Remove PDF annotations in C# .NET](/guides/dotnet/annotations/remove.md)
- [Import XMP annotation data to PDF or image in C#](/guides/dotnet/annotations/import-xmp.md)
- [Stamp a PDF document in C# .NET](/guides/dotnet/annotations/stamp-a-document.md)
- [Add PDF actions using C# in form fields](/guides/dotnet/annotations/pdf-actions-support.md)
- [XMP annotations in C# .NET](/guides/dotnet/annotations/xmp-annotations.md)

