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

Add a text box annotation to a PDF.

// How do I add a free text annotation in a PDF?

// Display a note with text content in a PDF.

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