officefileapi-devexpress-dot-pdf-dot-pdffreetextannotationfacade-70d837d4.md
Gets or sets the intent of a free text annotation.
Namespace : DevExpress.Pdf
Assembly : DevExpress.Pdf.v25.2.Core.dll
NuGet Package : DevExpress.Pdf.Core
public PdfFreeTextAnnotationIntent Intent { get; set; }
Public Property Intent As PdfFreeTextAnnotationIntent
| Type | Description |
|---|---|
| PdfFreeTextAnnotationIntent |
Indicates the annotation intent type.
|
Available values:
| Name | Description |
|---|---|
| FreeText |
The annotation is intended to function as a free text annotation (text box comment).
| | FreeTextCallout |
The annotation is intended to function as a callout annotation.
| | FreeTextTypewriter |
The annotation is intended to function as click-to-type or a typewriter object. This type of annotation has no callout or border.
|
A free text annotation’s SetCallout method call adds a callout line to the annotation and sets its Intent property to FreeTextCallout.
Set the Intent property to FreeTextTypewriter to convert a text box or a callout annotation to a typewriter (click-to-type) object. This object has no border, callout line, or padding between the text and bounds.
Set this property to FreeText to convert a callout or a typewriter annotation to a text box.
The code sample below creates a typewriter annotation:
using (PdfDocumentProcessor processor = new PdfDocumentProcessor())
{
// Load a document
processor.LoadDocument("..\\..\\Document.pdf");
// Access the first page properties
PdfPageFacade pageFacade = processor.DocumentFacade.Pages[0];
// Define an annotation area
PdfRectangle rectangle = new PdfRectangle(663, 526, 763, 576);
// Create a free text annotation
PdfFreeTextAnnotationFacade freeText =
pageFacade.AddFreeTextAnnotation(rectangle, "Free Text Annotation");
// Specify annotation parameters
freeText.Author = "Nancy Davolio";
freeText.Intent = PdfFreeTextAnnotationIntent.FreeTextTypewriter;
// Save the result
processor.SaveDocument("..\\..\\Result.pdf");
}
Using processor As New PdfDocumentProcessor()
' Load a document
processor.LoadDocument("..\..\Document.pdf")
' Access the first page properties
Dim pageFacade As PdfPageFacade = processor.DocumentFacade.Pages(0)
' Define an annotation area
Dim rectangle As New PdfRectangle(663, 526, 763, 576)
' Create a free text annotation
Dim freeText As PdfFreeTextAnnotationFacade =
pageFacade.AddFreeTextAnnotation(rectangle, "Free Text Annotation")
' Specify annotation parameters
freeText.Author = "Nancy Davolio"
freeText.Intent = PdfFreeTextAnnotationIntent.FreeTextTypewriter
' Save the result
processor.SaveDocument("..\..\Result.pdf")
End Using
See Also
PdfFreeTextAnnotationFacade Class