THPDFPage.CreateTextField Method

Provides the CreateTextField behavior for the AcroForm workflow. Use it when the surrounding API family needs explicit control over PDF objects, page content, resources, conformance, or diagnostics

Declaration

function CreateTextField(const FieldName, InitialValue: AnsiString; Rectangle: TRect; MaxLen: Integer= 0; Flags: THPDFFormFieldFlags= []): THPDFAcroFormField;

Unit

HPDFDoc

Parameters

NamePurpose
FieldNameAcroForm field name or field dictionary targeted by the helper
InitialValueInput used by CreateTextField
RectanglePage area or widget rectangle where the operation is applied
MaxLenInput used by CreateTextField
FlagsInput used by CreateTextField

Return value

Returns a THPDFAcroFormField value

The field mask assembled from Flags retains its exact integer bits during creation and subsequent fluent flag edits, saving and reloading

See AcroForm field flag precision for signed mask values, inheritance and native builder behavior

Usage notes

Related APIs