Skip to main content
All docs
V25.1
  • PdfPageFacade.AddTextAnnotation(PdfPoint) Method

    Adds a text annotation at the specified point on the page.

    Namespace: DevExpress.Pdf

    Assembly: DevExpress.Pdf.v25.1.Core.dll

    NuGet Package: DevExpress.Pdf.Core

    Declaration

    public PdfTextAnnotationFacade AddTextAnnotation(
        PdfPoint point
    )

    Parameters

    Name Type Description
    point PdfPoint

    The point on the page to position the text annotation.

    Returns

    Type Description
    PdfTextAnnotationFacade

    An object that contains text annotation properties.

    Remarks

    The code sample below creates a sticky note at the specified point on the first page:

    using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
    {
      // Load a document
      processor.LoadDocument("..\\..\\Document.pdf");
    
      // Access the first page properties
      PdfPageFacade page = processor.DocumentFacade.Pages[0];
    
      // Add sticky note at the specified point
      PdfTextAnnotationFacade textAnnotation =
         page.AddTextAnnotation(new PdfPoint(64, 65));
    
      // Specify annotation parameters
      textAnnotation.Author = "Nancy Davolio";
      textAnnotation.Color = new PdfRGBColor(0.8, 0.2, 0.1);
      textAnnotation.Contents = "Please proofread this document";
    }
    
    See Also