using IronPdf;
// Create a new PDF or load and edit an existing document.
var pdf = PdfDocument.FromFile("existing.pdf");
// Create a PDF annotation object
var annotation = new IronPdf.Annotations.TextAnnotation()
{
Title = "This is the major title",
Subject = "This is a subtitle",
Contents = "This is the long 'sticky note' comment content...",
Icon = IronPdf.Annotations.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 load and edit an existing document.
Private pdf = PdfDocument.FromFile("existing.pdf")
' Create a PDF annotation object
Private annotation = New IronPdf.Annotations.TextAnnotation() With {
.Title = "This is the major title",
.Subject = "This is a subtitle",
.Contents = "This is the long 'sticky note' comment content...",
.Icon = IronPdf.Annotations.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")