Annotations

C# + VB.Net: Annotations Annotations
using IronPdf;

// create a new PDF or edit an existing document.
PdfDocument Pdf = PdfDocument.FromFile("existing.pdf");

// Create a PDF annotation object
var Annotation = new IronPdf.PdfDocument.TextAnnotation()
    {
        Title = "This is the major title",
        Subject = "This is a subtitle",
        Contents = "This is the long 'sticky note' comment content...",
        Icon = PdfDocument.TextAnnotation.AnnotationIcon.Help,
        Opacity = 0.9,
        Printable = false,
        Hidden = false,
        OpenByDefault = true,
        ReadOnly = false,
        Rotateable = true
    };

// Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
Pdf.AddTextAnnotation(Annotation, 1, 150, 250);


Pdf.SaveAs("existing.pdf");
Imports IronPdf

' create a new PDF or edit an existing document.
Private Pdf As PdfDocument = PdfDocument.FromFile("existing.pdf")

' Create a PDF annotation object
Private Annotation = New IronPdf.PdfDocument.TextAnnotation() With {
	.Title = "This is the major title",
	.Subject = "This is a subtitle",
	.Contents = "This is the long 'sticky note' comment content...",
	.Icon = PdfDocument.TextAnnotation.AnnotationIcon.Help,
	.Opacity = 0.9,
	.Printable = False,
	.Hidden = False,
	.OpenByDefault = True,
	.ReadOnly = False,
	.Rotateable = True
}

' Add the annotation "sticky note" to a specific page and location within any new or existing PDF.
Pdf.AddTextAnnotation(Annotation, 1, 150, 250)


Pdf.SaveAs("existing.pdf")

PDF annotations allow "sticky note" like comments to be added to PDF pages. The IronPDF.PdfDocument.AddTextAnnotation method and PdfDocument.TextAnnotation class allows annotations to be added programatically. Advanced text annotation features supported include coloring, sizing, opacity, icons, and editing.