from ironpdf import * # Load an existing PDF or create a new one pdf = PdfDocument("existing.pdf") pageIndex = 0 # Create a TextAnnotation object annotation = TextAnnotation(pageIndex) annotation.Title = "This is the major title" annotation.Subject = "This is a subtitle" annotation.Contents = "This is the long 'sticky note' comment content..." annotation.Icon = TextAnnotation.AnnotationIcon.Help annotation.X = 150 annotation.Y = 200 annotation.Width = 200 annotation.Height = 50 annotation.Opacity = 0.9 annotation.Printable = False annotation.Hidden = False annotation.OpenByDefault = True annotation.ReadOnly = False annotation.Rotatable = True # Add the annotation to a specific page and location within the PDF pdf.Annotations.Add(annotation) # Save the PDF pdf.SaveAs("existing.pdf")