THotPDF.CreateLoadedFieldWidget Method

On a specified page of the loaded PDF, creates a new form field control dictionary with a given field name and position rectangle, used to append interactive form controls to existing PDF documents

Declaration

function CreateLoadedFieldWidget(PageIndex: Integer; const AFieldName: AnsiString; ARect: THPDFRect): THPDFDictionaryObject;

Unit

HPDFDoc

Parameters

NamePurpose
PageIndexZero-based index of the target page, specifying the page to which the control belongs
AFieldNameThe unique name of the new field, which must not clash with existing fields in the same document
ARectThe position and size rectangle of the control on the page, using the PDF coordinate system (origin at the bottom-left corner of the page)
X2Input supplied to CreateLoadedFieldWidget
Y2Input supplied to CreateLoadedFieldWidget
AFieldNameAcroForm field name or field dictionary targeted by the helper
AFieldTypeAcroForm field name or field dictionary targeted by the helper
AFlagsInput supplied to CreateLoadedFieldWidget

Return value

Returns a dictionary object representing the newly created field widget

The complete signed Integer AFlags bit pattern is retained in the new field's /Ff entry, including high bits together with the common field flags

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

Usage notes

Related APIs