---
title: "Save a file from the annotation manager in C# .NET | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/save-a-file/annotation-to-pdf/"
md_url: "https://www.nutrient.io/guides/dotnet/save-a-file/annotation-to-pdf.md"
last_updated: "2026-05-21T17:12:02.215Z"
description: "Discover how to convert annotations to JPG, PDF, TIFF, and XMP formats with our step-by-step guide. Streamline your file management today!"
---

# Save a file from the annotation manager in C#

### To JPG

[To JPG](https://www.nutrient.io/guides/dotnet/save-a-file/annotation-to-jpg.md)

### To PDF

[To PDF](https://www.nutrient.io/guides/dotnet/save-a-file/annotation-to-pdf.md)

### To TIFF

[To TIFF](https://www.nutrient.io/guides/dotnet/save-a-file/annotation-to-tiff.md)

### To XMP

[To XMP](https://www.nutrient.io/guides/dotnet/save-a-file/annotation-to-xmp.md)

If you need to add annotations to a document and export the result as PDF, use the [`AnnotationManager` class](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.AnnotationManager.html) with the [`SaveDocumentToPDF` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.AnnotationManager~SaveDocumentToPDF.html).

`SaveDocumentToPDF` overloads:

- `SaveDocumentToPDF(string FilePath)`

- `SaveDocumentToPDF(Stream Stream)`

This method saves with GdPicture/XMP annotation support and returns a `GdPictureStatus`.

To flatten the annotations while saving the document, call the [`BurnAnnotationsToPage` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.AnnotationManager~BurnAnnotationsToPage.html) before saving.

To add an annotation and save as PDF, use the following code:

### C#

```csharp

using GdPicture14;
using GdPicture14.Annotations;
using System;
using System.Drawing;

using AnnotationManager annotationManager = new AnnotationManager();

GdPictureStatus status = annotationManager.InitFromFile(@"C:\temp\source.pdf");
if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"InitFromFile failed: {status}");
    return;
}

if (annotationManager.PageCount == 0)
{
    Console.WriteLine("Document contains no pages.");
    return;
}

status = annotationManager.SelectPage(1);
if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"SelectPage failed: {status}");
    return;
}

AnnotationRubberStamp stamp = annotationManager.AddRubberStampAnnot(
    Color.Red,
    0.5f,
    0.5f,
    2,
    1,
    "APPROVED");

if (stamp == null)
{
    Console.WriteLine("AddRubberStampAnnot failed.");
    return;
}

stamp.Rotation = 20;

status = annotationManager.SaveAnnotationsToPage();
if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"SaveAnnotationsToPage failed: {status}");
    return;
}

status = annotationManager.BurnAnnotationsToPage(false);
if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"BurnAnnotationsToPage failed: {status}");
    return;
}

status = annotationManager.SaveDocumentToPDF(@"C:\temp\output.pdf");
if (status!= GdPictureStatus.OK)
{
    Console.WriteLine($"SaveDocumentToPDF failed: {status}");
}

```

### VB.NET

```vb

Imports GdPicture14
Imports GdPicture14.Annotations
Imports System.Drawing

Using annotationManager As New AnnotationManager()
    Dim status As GdPictureStatus = annotationManager.InitFromFile("C:\temp\source.pdf")
    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"InitFromFile failed: {status}")
        Return
    End If

    If annotationManager.PageCount = 0 Then
        Console.WriteLine("Document contains no pages.")
        Return
    End If

    status = annotationManager.SelectPage(1)
    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"SelectPage failed: {status}")
        Return
    End If

    Dim stamp As AnnotationRubberStamp = annotationManager.AddRubberStampAnnot(
        Color.Red,
        0.5F,
        0.5F,
        2,
        1,
        "APPROVED")

    If stamp Is Nothing Then
        Console.WriteLine("AddRubberStampAnnot failed.")
        Return
    End If

    stamp.Rotation = 20

    status = annotationManager.SaveAnnotationsToPage()
    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"SaveAnnotationsToPage failed: {status}")
        Return
    End If

    status = annotationManager.BurnAnnotationsToPage(False)
    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"BurnAnnotationsToPage failed: {status}")
        Return
    End If

    status = annotationManager.SaveDocumentToPDF("C:\temp\output.pdf")
    If status <> GdPictureStatus.OK Then
        Console.WriteLine($"SaveDocumentToPDF failed: {status}")
    End If
End Using

```
---

## Related pages

- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-jpg.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-bitmap.md)
- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-tiff.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-vector.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-ftp.md)
- [Save a file from the annotation manager in C#](/guides/dotnet/save-a-file/annotation-to-xmp.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-byte-array.md)
- [Save images in C#](/guides/dotnet/save-a-file/imaging-remote-url.md)
- [Save images and PDF files in C#](/guides/dotnet/save-a-file.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-incremental.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-local-storage.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-stream.md)
- [Save PDF files in C#](/guides/dotnet/save-a-file/pdf-incremental-to-stream.md)

