Nutrient .NET SDK

Add PDF annotations and stamps in C#

  • Rubber stamp annotations with predefined styles — Approved, Draft, Confidential, Final, and Not Approved
  • Free text, sticky notes, squares, circles, lines, and link annotations
  • Flatten annotations into page content, export to CSV, and import from XFDF
  • Annotate images (JPG, PNG, TIFF) in addition to PDFs using XMP annotations

Need pricing or implementation help? Talk to Sales.

PDF ANNOTATIONS IN C#

using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"C:\temp\source.pdf");
gdpicturePDF.SetOrigin(PdfOrigin.PdfOriginBottomLeft);
gdpicturePDF.SetMeasurementUnit(
PdfMeasurementUnit.PdfMeasurementUnitCentimeter);
gdpicturePDF.SelectPage(gdpicturePDF.GetPageCount());
// Add an "Approved" stamp annotation.
gdpicturePDF.AddStampAnnotation(
Left: 5, Top: 5, Width: 5, Height: 2,
"Nutrient", "Approved",
PdfRubberStampAnnotationIcon.Approved,
0.75f, 173, 216, 230);
gdpicturePDF.SaveToFile(@"C:\temp\output.pdf");

USE CASES

When developers reach for this SDK

Stamp PDFs with approval status

Apply rubber stamp annotations — Approved, Draft, Confidential, Final, or Not Approved — to documents in batch. Stamps follow the PDF specification and render in any compliant viewer.

Automate document markup

Add free text, shapes, sticky notes, and links to PDFs as part of an automated pipeline. All annotation operations are programmatic — no GUI required.

Flatten annotations for archiving

Burn annotations into page content so they can no longer be edited or removed. Flatten individual annotations or all annotations on a page at once.

Annotate images and scanned documents

Add annotations to JPG, PNG, and TIFF files — not just PDFs. XMP annotations are embedded in the image metadata and can be imported, exported, and burned into the image.

PDF annotation capabilities for .NET

Create annotations

Add annotations to any PDF page. Set the coordinate system, measurement unit, and position. Each annotation returns an index for later reference.


  • Free text, sticky notes, squares, circles, and lines
  • Links to pages or external URLs
  • File and image attachments on annotations

Stamp annotations

Apply rubber stamp annotations with predefined styles. Configure position, size, color, and opacity. Stamp any page in a document.


  • Approved, Draft, Confidential, Final, Not Approved
  • Custom RGB color and opacity per stamp
  • Configurable position and dimensions

Flatten, edit, and remove

Flatten annotations into permanent page content. Edit properties like contents, color, and opacity. Remove individual annotations or clear all on a page.


  • Flatten individual or all annotations per page
  • Edit color, contents, opacity, and flags
  • Remove annotations by index

Import, export, and XMP

Export annotation data to CSV. Import from XFDF files or databases. Annotate images with XMP and save/load annotations as XML or Base64.


  • Export PDF annotations to CSV
  • Import annotation data from XFDF
  • XMP annotations for JPG, PNG, and TIFF files


ADVANCED CAPABILITIES

Beyond basic annotation

The SDK supports PDF annotations and XMP annotations for images. Read and write annotation properties, attach files and images, apply PDF actions (navigation, JavaScript, URLs), and manage annotations on JPG, PNG, and TIFF files through a dedicated annotation manager. All operations are available in both C# and VB.NET.

Illustration of PDF annotation capabilities
PDF actions on annotations

Attach actions to annotations — navigate to a page, open a URL, launch an application, or execute JavaScript when a user clicks an annotation.


Read annotation properties

Access any property of an existing annotation — color, fill color, contents, opacity, flags, bounding box, quad points, subject, and title.


XMP annotation manager

Annotate images (JPG, PNG, TIFF) with a dedicated manager. Add, edit, burn, save, and load XMP annotations from XML files, streams, or Base64 strings.


VB.NET support

All annotation operations are available in VB.NET with the same API. The guides include complete code examples in both C# and VB.NET.


Frequently asked questions

How do I add annotations to a PDF in C#?

Load the PDF, set the coordinate system and measurement unit, select a page, and add the annotation. The SDK provides methods for free text, squares, circles, stamps, sticky notes, lines, and links. Each method returns an index you can use to reference the annotation later. See the create annotations guide for complete C# examples.

How do I stamp a PDF in .NET?

Add a stamp annotation to a page using the SDK’s stamp method. Choose from predefined rubber stamp styles: Approved, Draft, Confidential, Final, and Not Approved. Configure the position, size, color (RGB), and opacity. Stamps follow the PDF specification and render in any compliant viewer. See the stamp guide.

How do I flatten annotations in C#?

Flatten individual annotations by index, or loop through all annotations on a page and flatten each one. Flattened annotations become permanent page content — they can no longer be edited, moved, or removed. This is commonly used for archiving and compliance. See the flatten guide.

Can I export annotation data from a PDF?

Yes. The SDK can export annotation data — index, type, and contents — to CSV format, organized by page. This is useful for reporting, auditing, or feeding annotation data into external systems. See the export guide.

How do I import annotations from XFDF?

The SDK imports annotation data from XFDF files or from database streams containing XFDF data. You control whether to import form fields, annotations, or both. See the XFDF import guide.

Can I annotate images (JPG, PNG, TIFF) — not just PDFs?

Yes. The SDK supports XMP annotations on image files. Use the annotation manager to add text, stamps, shapes, freehand drawings, and comments to JPG, PNG, and TIFF files. Annotations are stored as XMP metadata and can be saved to XML, streams, or Base64 strings. See the XMP annotations guide.

What annotation properties can I read and edit?

The SDK exposes color, fill color, contents, opacity, flags, bounding box, quad points, subject, title, name, and action ID for each annotation. You can read any property and modify contents and other editable fields. See the annotation properties guide.

Can I use the annotation SDK with VB.NET?

Yes. All annotation operations are available in VB.NET with the same API. The annotation guides include complete code examples in both C# and VB.NET.


FREE TRIAL

Ready to get started?

Add PDF annotations and stamps in C# in minutes — no payment information required.