officefileapi-devexpress-dot-pdf-dot-pdfpagefacade-dot-addtextannotation-x28-devexpress-dot-pdf-dot-pdfpoint-x29.md
Adds a text annotation at the specified point on the page.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public PdfTextAnnotationFacade AddTextAnnotation(
PdfPoint point
)
Public Function AddTextAnnotation(
point As PdfPoint
) As PdfTextAnnotationFacade
| Name | Type | Description |
|---|---|---|
| point | PdfPoint |
The point on the page to position the text annotation.
|
| Type | Description |
|---|---|
| PdfTextAnnotationFacade |
An object that contains text annotation properties.
|
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";
}
Using processor As New PdfDocumentProcessor()
' Load a document
processor.LoadDocument("..\..\Document.pdf")
' Access the first page properties
Dim facade As PdfDocumentFacade = processor.DocumentFacade
Dim page As PdfPageFacade = facade.Pages(0)
' Add sticky note at the specified point
Dim textAnnotation As PdfTextAnnotationFacade =
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"
End Using
See Also