Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

PdfPageFacade.AddTextAnnotation(PdfPoint) Method

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

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v24.2.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