---
title: "Get PDF annotation properties in C# .NET | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/annotations/get-properties/"
md_url: "https://www.nutrient.io/guides/dotnet/annotations/get-properties.md"
last_updated: "2026-05-21T17:12:02.199Z"
description: "Learn how to get and retrieve properties of annotations within PDF documents programmatically in C# .NET using Nutrient .NET SDK. Access annotation details for processing."
---

# Get PDF annotation properties in C# .NET

To get a PDF’s annotation properties, use one of the following methods:

- [`GetAnnotationActionID`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationActionID.html) — Returns the action’s ID associated with the annotation.

- [`GetAnnotationColor`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationColor.html) — Returns a `GdPictureColor` object that specifies the annotation’s color.

- [`GetAnnotationContents`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationContents.html) — Returns a string value of the annotation’s content. For some annotation types, it returns the annotation’s description.

- [`GetAnnotationFillColor`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationFillColor.html) — Returns a `GdPictureColor` object that specifies the interior color of the annotation. It can be used for geometric type annotations such as square, circle, line, or polygon annotations.

- [`GetAnnotationFlags`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationFlags.html) — Returns a bitwise combination of the flags set for the annotation. The values are represented as members of the [`PdfAnnotationFlag` enumeration](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14~GdPicture14.PdfAnnotationFlag.html).

- [`GetAnnotationName`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationName.html) — Returns the annotation name.

- [`GetAnnotationOpacity`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationOpacity.html) — Returns the opacity value of the annotation.

- [`GetAnnotationQuadPoints`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationQuadPoints.html) — Returns the `QuadPoints` property of the annotation. This method is only applicable for link, highlight, underline, squiggly, and strikeout annotation types.

- [`GetAnnotationRect`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationRect.html) — Returns the bounding box coordinates of the upper-left corner, its width, and its height. Those values depend on the specified origin of the coordinate system and the declared measurement unit used.

- [`GetAnnotationSubject`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationSubject.html) — Returns the annotation subject.

- [`GetAnnotationSubType`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationSubType.html) — Returns the annotation subtype as a string value.

- [`GetAnnotationTitle`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationTitle.html) — Returns the annotation title.

- [`GetAnnotationType`](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationType.html) — This method always returns the `Annot` value for annotations. Use the [`GetAnnotationSubType` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationSubType.html) to get the specific annotation subtype.

All these methods require the annotation index as their parameter and sometimes may require reference parameters.

The methods listed above are helpful when searching for an annotation on which you want to perform other operations. The code example below shows how to find a text annotation using the [`GetAnnotationTitle` method](https://www.nutrient.io/api/gdpicture/GdPicture.NET.14.API~GdPicture14.GdPicturePDF~GetAnnotationTitle.html) and change its content:

### C#

```csharp

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
// Select the PDF page.
gdpicturePDF.SelectPage(1);
// Get the annotation count.
int annotCount = gdpicturePDF.GetAnnotationCount();
// Loop through all annotations.
for (int i = 0; i < annotCount; i++)
{
    // Check if the current annotation is of the `FreeText` type.
    if (gdpicturePDF.GetAnnotationSubType(i) == "FreeText")
    {
        // Change the annotation content.
        gdpicturePDF.SetAnnotationContents(i, "New content");
    }
}
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

```

### VB.NET

```vb

Using gdpicturePDF As GdPicturePDF = New GdPicturePDF()
    gdpicturePDF.LoadFromFile("C:\temp\source.pdf")
    ' Select the PDF page.
    gdpicturePDF.SelectPage(1)
    ' Get the annotation count.
    Dim annotCount As Integer = gdpicturePDF.GetAnnotationCount()
    ' Loop through all annotations.
    For i = 0 To annotCount - 1
        ' Check if the current annotation is of the `FreeText` type.
        If gdpicturePDF.GetAnnotationSubType(i) Is "FreeText" Then
            ' Change the annotation content.
            gdpicturePDF.SetAnnotationContents(i, "New content")
        End If
    Next
    gdpicturePDF.SaveToFile("C:\temp\output.pdf")
End Using

```

#### Used methods

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

- [`GetAnnotationSubType`]

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

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

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

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

#### Related topics

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

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

## Related pages

- [Custom annotations](/guides/dotnet/annotations/custom-annotations.md)
- [Annotate on images in C# .NET](/guides/dotnet/annotations/annotate-on-images.md)
- [Attach an image to an annotation in C#](/guides/dotnet/annotations/attach-an-image.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)
- [Edit PDF annotations in C#](/guides/dotnet/annotations/edit.md)
- [Export XMP annotation data in C# .NET](/guides/dotnet/annotations/export-xmp.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)
- [Remove PDF annotations in C# .NET](/guides/dotnet/annotations/remove.md)
- [PDF annotations in C#.NET](/guides/dotnet/annotations.md)
- [Add PDF actions using C# in form fields](/guides/dotnet/annotations/pdf-actions-support.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)
- [XMP annotations in C# .NET](/guides/dotnet/annotations/xmp-annotations.md)

