---
title: "Add stamp annotations in C# | Nutrient .NET SDK"
canonical_url: "https://www.nutrient.io/guides/dotnet/csharp/editor/add-stamp-annotations-to-pdf/"
md_url: "https://www.nutrient.io/guides/dotnet/csharp/editor/add-stamp-annotations-to-pdf.md"
last_updated: "2026-10-08T00:00:00.000Z"
description: "How to add stamp annotations to a PDF using Nutrient .NET SDK."
---

# Adding stamp annotations to a PDF document

Use stamp annotations to mark document state in PDF workflows.

Common use cases include:

- Approval and rejection workflows

- Draft and final document marking

- Confidentiality labeling

- Quality control and review tracking

In this guide, you’ll add:

- Default and custom stamp styles

- Color-customized stamps

- Multiple status stamps on one page

[Download sample](https://www.nutrient.io/downloads/samples/csharp/add-stamp-annotations-to-pdf.zip)

## How Nutrient helps

Nutrient.NET SDK handles stamp annotation structures and appearance generation.

The SDK handles:

- Stamp annotation dictionaries and icon rendering

- Stamp appearance streams and text positioning

- Stamp style resources and icon loading

- Appearance state and color transformations

## Complete implementation

This example adds several stamp annotations to a PDF file:

```csharp

using Nutrient;

```

## Working with stamp annotations

Open the document with [using statements](https://learn.microsoft.com/dotnet/csharp/language-reference/statements/using) so resources are cleaned up after processing.

Then:

- Create a PDF editor.

- Get the page collection.

- Add a letter-size page (`612 × 792`) if the document is empty.

- Get the annotation collection from the first page.

```csharp

try
{
    using Document document = Document.Open("input.pdf");
    using PdfEditor editor = PdfEditor.Edit(document);
    PdfPageCollection pages = editor.PageCollection;

    if (pages.Count == 0)
    {
        pages.Add(612.0f, 792.0f);
    }

    PdfPage page = pages.First?? throw new InvalidOperationException("The document has no pages.");
    PdfAnnotationCollection annotations = page.AnnotationCollection;

```

## Adding a basic stamp

Add a stamp with `AddStamp(x, y, width, height, title, contents)`.

In this sample:

- The position is `(400, 700)`.

- The size is `150 × 50`.

- The default style is `Draft`.

- The default color is red (`ARGB 255, 255, 0, 0`).

```csharp

    PdfStampAnnotation draftStamp = annotations.AddStamp(
        400.0f, 700.0f, 150.0f, 50.0f, // x, y, width, height
        "Author",
        "Work in progress"
    );

```

## Adding an approved stamp

Add a second stamp and customize its style.

This sample:

- Adds a stamp at `(400, 600)`.

- Sets the stamp style to `PdfRubberStampIcon.Approved` with `StampStyle`.

- Sets the color to green with `Color.FromArgb(255, 0, 128, 0)`.

```csharp

    PdfStampAnnotation approvedStamp = annotations.AddStamp(
        400.0f, 600.0f, 150.0f, 50.0f, // x, y, width, height
        "Approver Name",
        "Document approved on review"
    );
    // Customize the stamp appearance
    approvedStamp.StampStyle = PdfRubberStampIcon.Approved;
    approvedStamp.Color = Color.FromArgb(255, 0, 128, 0);

```

## Adding a confidential stamp

Add a confidentiality stamp and set its icon style.

This sample sets:

- The position to `(400, 500)`.

- The stamp style to `PdfRubberStampIcon.Confidential`.

The stamp keeps the default red color unless you set a different color:

```csharp

    PdfStampAnnotation confidentialStamp = annotations.AddStamp(
        400.0f, 500.0f, 150.0f, 50.0f, // x, y, width, height
        "Security Officer",
        "Contains sensitive information"
    );
    // Customize the stamp appearance
    confidentialStamp.StampStyle = PdfRubberStampIcon.Confidential;

```

## Other available stamp types

Use other `PdfRubberStampIcon` values to represent more states.

This sample adds:

- A `NotApproved` stamp at `(50, 700)`.

- A `Final` stamp at `(50, 600)` with the color blue (`ARGB 255, 0, 0, 255`).

```csharp

    // Not Approved stamp
    PdfStampAnnotation notApprovedStamp = annotations.AddStamp(
        50.0f, 700.0f, 150.0f, 50.0f, // x, y, width, height
        "Reviewer",
        "Rejected"
    );
    notApprovedStamp.StampStyle = PdfRubberStampIcon.NotApproved;

    // Final stamp
    PdfStampAnnotation finalStamp = annotations.AddStamp(
        50.0f, 600.0f, 150.0f, 50.0f, // x, y, width, height
        "Legal",
        "Final version"
    );
    finalStamp.StampStyle = PdfRubberStampIcon.Final;
    finalStamp.Color = Color.FromArgb(255, 0, 0, 255);

```

## Saving the document

Save the output PDF.

The `catch` block catches `NutrientException` if processing fails:

```csharp

    editor.SaveAs("output.pdf");
    Console.WriteLine("Successfully saved output.pdf");
}
catch (NutrientException e)
{
    Console.Error.WriteLine($"Error: {e.Message}");
    Environment.Exit(1);
}

```

## Conclusion

Use this workflow to add stamp annotations:

1. Open the document with `using` statements for automatic resource cleanup.

2. Create an editor and access the page collection.

3. Ensure at least one page exists by adding a letter-size page if needed.

4. Retrieve the annotation collection for the target page.

5. Add basic stamp annotations with the default `Draft` style and red color.

6. Customize stamp styles using `StampStyle` with `PdfRubberStampIcon` enumeration values.

7. Customize stamp colors using the `Color` property with ARGB color values.

8. Add `Approved` stamps with green color for approval workflows.

9. Add `Confidential` stamps for marking sensitive documents.

10. Add `NotApproved` stamps for rejection indicators.

11. Add `Final` stamps to mark completed documents.

12. Save the document — the `using` statements release the native handles.

For related annotation workflows, refer to the [.NET SDK annotation guides](https://www.nutrient.io/guides/dotnet/csharp/editor.md).
---

## Related pages

- [Nutrient .NET SDK editor guides](/guides/dotnet/csharp/editor.md)
- [Adding annotations to a PDF document](/guides/dotnet/csharp/editor/add-annotations-to-pdf.md)
- [Adding a custom page to a PDF document](/guides/dotnet/csharp/editor/add-custom-page-to-pdf.md)
- [Adding interactive form fields to a PDF document](/guides/dotnet/csharp/editor/add-form-fields-to-pdf.md)
- [Adding free text annotations to a PDF document](/guides/dotnet/csharp/editor/add-freetext-annotations-to-pdf.md)
- [Adding invisible digital signatures to a PDF document](/guides/dotnet/csharp/editor/add-invisible-signature-to-pdf.md)
- [Adding link annotations to a PDF document](/guides/dotnet/csharp/editor/add-link-annotations-to-pdf.md)
- [Adding redaction annotations to a PDF document](/guides/dotnet/csharp/editor/add-redaction-annotations-to-pdf.md)
- [Adding shape annotations to a PDF document](/guides/dotnet/csharp/editor/add-shape-annotations-to-pdf.md)
- [Adding sticky note annotations to a PDF document](/guides/dotnet/csharp/editor/add-sticky-note-annotations-to-pdf.md)
- [Adding text markup annotations to a PDF document](/guides/dotnet/csharp/editor/add-text-markup-annotations-to-pdf.md)
- [Adding visible digital signatures to a PDF document](/guides/dotnet/csharp/editor/add-visible-signature-to-pdf.md)
- [Advanced digital signature workflows](/guides/dotnet/csharp/editor/advanced-digital-signatures.md)
- [Detecting and adding form fields to a PDF document](/guides/dotnet/csharp/editor/detect-and-add-form-fields.md)
- [Editing PDF form fields](/guides/dotnet/csharp/editor/editing-pdf-form-fields.md)
- [Editing PDF metadata with Nutrient .NET SDK](/guides/dotnet/csharp/editor/editing-pdf-metadata.md)
- [Filling PDF form fields](/guides/dotnet/csharp/editor/fill-pdf-form.md)
- [Managing PDF page order](/guides/dotnet/csharp/editor/manage-pdf-page-order.md)
- [Merging PDFs](/guides/dotnet/csharp/editor/merge-pdf-into-other-pdf.md)

