This sample shows how to add text annotations (sticky notes) to your PDF document using PdfPage.AddTextAnnotation(..) method.

AddTextAnnotation method returns an instance of PdfTextAnnotation class.

C#
using System.Diagnostics;

namespace BitMiracle.Docotic.Pdf.Samples
{
    public static class Annotations
    {
        public static void Main()
        {
            // NOTE: 
            // When used in trial mode, the library imposes some restrictions.
            // Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            // for more information.

            string pathToFile = "Annotations.pdf";

            using (PdfDocument pdf = new PdfDocument())
            {
                PdfPage page = pdf.Pages[0];
                const string content = "Lorem ipsum dolor sit amet, consectetur adipisicing elit";
                PdfTextAnnotation textAnnotation = page.AddTextAnnotation(10, 50, "Docotic.Pdf Samples", content);
                textAnnotation.Icon = PdfTextAnnotationIcon.Comment;
                textAnnotation.Opened = true;

                pdf.Save(pathToFile);
            }

            Process.Start(pathToFile);
        }
    }
}
VB
Imports System.Diagnostics
Imports System.IO

Imports BitMiracle.Docotic.Pdf

Namespace BitMiracle.Docotic.Pdf.Samples
    Public NotInheritable Class Annotations
        Public Shared Sub Main()
            ' NOTE: 
            ' When used in trial mode, the library imposes some restrictions.
            ' Please visit http://bitmiracle.com/pdf-library/trial-restrictions.aspx
            ' for more information.

            Dim pathToFile As String = "Annotations.pdf"

            Using pdf As New PdfDocument()
                Dim page As PdfPage = pdf.Pages(0)
                Const content As String = "Lorem ipsum dolor sit amet, consectetur adipisicing elit"
                Dim textAnnotation As PdfTextAnnotation = page.AddTextAnnotation(10, 50, "Docotic.Pdf Samples", content)
                textAnnotation.Icon = PdfTextAnnotationIcon.Comment
                textAnnotation.Opened = True

                pdf.Save(pathToFile)
            End Using

            Process.Start(pathToFile)
        End Sub
    End Class
End Namespace