THotPDF.AddLoadedCheckBox Method

Adds a check box to a page of the loaded document and registers it in the AcroForm. The field receives on and off appearance states, and its appearance state follows AChecked

Declaration

function AddLoadedCheckBox(PageIndex: Integer; X1, Y1, X2, Y2: Single; const AFieldName, AExportValue: AnsiString; AChecked: boolean): Integer;

Unit

HPDFDoc

Parameters

NamePurpose
PageIndexZero-based index of the loaded page upon which the widget is placed
X1Left-hand edge of the widget rectangle in PDF user space (points, origin at the bottom-left corner of the page)
Y1Bottom edge of the widget rectangle in PDF user space
X2Right-hand edge of the widget rectangle in PDF user space
Y2Top edge of the widget rectangle in PDF user space
AFieldNameName of the new field; it must not already be present in the loaded form
AExportValueName of the on state and the value exported whilst checked; Yes when left empty
ACheckedTrue to create the box in the checked state

Return value

Index of the new field, for use alongside the other loaded form field methods, or -1 when PageIndex is out of range

Usage notes

Related APIs