Skip to main content

CreateFreeTextAnnot

Creates freeText annotation.

Syntax

expression.CreateFreeTextAnnot(rect);

expression - A variable that represents a Api class.

Parameters

NameRequired/OptionalData typeDefaultDescription
rectRequiredRectannotation rect.

Returns

ApiFreeTextAnnotation

Example

Create a freeText annotation and add it to the page.

// How do I create the free text annot in a PDF document?

// Create the free text annot and display the result in a PDF document.

let doc = Api.GetDocument();
let freeTextAnnot = Api.CreateFreeTextAnnot([10, 10, 160, 32]);
let page = doc.GetPage(0);
page.AddObject(freeTextAnnot);