THPDFPage.CreateTextField Method
Provides create text field behaviour 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
| Name | Purpose |
|---|---|
FieldName | AcroForm field name or field dictionary targeted by the helper |
InitialValue | Input used by CreateTextField |
Rectangle | Page area or widget rectangle where the operation is applied |
MaxLen | Input used by CreateTextField |
Flags | Input used by CreateTextField |
Return value
Returns a THPDFAcroFormField value
Usage notes
- Use this API in the AcroForm workflow before the affected page, resource, field, or catalog object is finalised
- Keep object names, field names, resource names, and returned handles stable until the document is finalised
- Page-level changes affect subsequent operators on the same page; save and restore graphics state when a temporary setting should not leak