// Install IronPdf with Nuget: PM> Install-Package IronPdf
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");
' Install IronPdf with Nuget: PM> Install-Package IronPdf
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")