[]
Text annotation represents a sticky note attached to a point in a PDF file. Upon closing, the annotation appears as an icon, and upon opening, it displays a pop-up window with the text of the note in the size and font selected by the viewer application. DsPdf provides TextAnnotation class to enable users to apply text annotations to the PDF document.

Refer to the following example code to add a text annotation to a PDF document:
public void CreateTextAnnotation()
{
GcPdfDocument doc = new GcPdfDocument();
Page page = doc.NewPage();
RectangleF rc = new RectangleF(50, 50, 200, 50);
page.Graphics.DrawString("A red text annotation initially open is placed to the right of this note.",
new TextFormat() { Font = StandardFonts.Times, FontSize = 11 }, rc);
//Create an instance of TextAnnotation class and set its relevant properties
var textAnnot = new TextAnnotation()
{
UserName = "Jamie Smith",
Contents = "This is a text annotation in red color.",
PdfRect = new RectangleF(rc.Right, rc.Top, 72 * 2, 72),
Color = Color.Red,
Open = true
};
page.Annotations.Add(textAnnot); //Add the text annotation
doc.Save("TextAnnotation.pdf");
}