[]
DsPdfJS API / CheckBoxField
Represents CheckBox AcroForm field.
new CheckBoxField(
om):CheckBoxField
Creates a new CheckBoxField.
ObjectManager that controls the lifetime of the CheckBoxField.
CheckBoxField
Field.constructor
new CheckBoxField():
CheckBoxField
Creates a new CheckBoxField.
CheckBoxField
Field.constructor
get alternateName():
string|null
Gets or sets an alternate field name to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
string | null
set alternateName(
value):void
Gets or sets an alternate field name to be used in place of the actual field name wherever the field must be identified in the user interface (such as in error or status messages referring to the field). This text is also useful when extracting the document's contents in support of accessibility to users with disabilities or for other purposes.
string | null
void
get calculationIndex():
number
Gets or sets an index that is used to determine the field's calculation order. Fields with lower indices are calculated before fields with higher indices.
If several fields have the same CalculationIndex, the calculation order is determined by the order of fields in the collection.
recalculateValue can be used to specify JavaScript that is used to calculate the field's value.
number
set calculationIndex(
value):void
Gets or sets an index that is used to determine the field's calculation order. Fields with lower indices are calculated before fields with higher indices.
If several fields have the same CalculationIndex, the calculation order is determined by the order of fields in the collection.
recalculateValue can be used to specify JavaScript that is used to calculate the field's value.
number
void
get checked():
boolean
Gets or sets the value of this CheckBoxField as a Boolean value. See CheckBoxField#value for details.
boolean
set checked(
value):void
Gets or sets the value of this CheckBoxField as a Boolean value. See CheckBoxField#value for details.
boolean
void
get checkStyle():
CheckStyle|null
Gets or sets the style of check mark that is used by this CheckBoxField. This property wraps the WidgetAnnotation#checkStyle property and functions identically to: this.widget.checkStyle = value;
Note that a field may have multiple associated annotations across different pages. These can be added and configured using the @widgets property.
CheckStyle | null
set checkStyle(
value):void
Gets or sets the style of check mark that is used by this CheckBoxField. This property wraps the WidgetAnnotation#checkStyle property and functions identically to: this.widget.checkStyle = value;
Note that a field may have multiple associated annotations across different pages. These can be added and configured using the @widgets property.
void
get children():
FieldCollection
Gets the list of child fields.
get defaultChecked():
boolean
Gets or sets the default value of this CheckBoxField as a Boolean value. See CheckBoxField#value for details.
boolean
set defaultChecked(
value):void
Gets or sets the default value of this CheckBoxField as a Boolean value. See CheckBoxField#value for details.
boolean
void
get defaultValue():
string|number|boolean|number[] |null
Gets or sets the default value of this CheckBoxField. See CheckBoxField#value for details.
string | number | boolean | number[] | null
set defaultValue(
value):void
Gets or sets the default value of this CheckBoxField. See CheckBoxField#value for details.
string | number | boolean | number[] | null
void
get doc():
PdfDocument|null
Gets the PdfDocument owning this field.
PdfDocument | null
get export():
boolean
Gets or sets a value indicating whether the field must not be exported by a ActionSubmitForm action.
boolean
set export(
value):void
Gets or sets a value indicating whether the field must not be exported by a ActionSubmitForm action.
boolean
void
get formatValue():
ActionJavaScript|null
Gets or sets a JavaScript action to be performed before the field is formatted to display its current value. This action can modify the field's value before formatting.
ActionJavaScript | null
set formatValue(
value):void
Gets or sets a JavaScript action to be performed before the field is formatted to display its current value. This action can modify the field's value before formatting.
ActionJavaScriptProperties | ActionJavaScript | null
void
get hasRadioButtonBehavior():
boolean
Checks whether this CheckBoxField actually behaves as a RadioButtonField. This situation takes place if the checkbox field owns more than one WidgetAnnotations, and the widgets' appearance streams used to show checked state have different names.
boolean
get id():
number
Gets the reference to the object.
number
get justification():
VariableTextJustification|null
Gets or sets the justification to be used in displaying the field's text. Note that this field is used only if WidgetAnnotation#justification is not specified.
VariableTextJustification | null
set justification(
value):void
Gets or sets the justification to be used in displaying the field's text. Note that this field is used only if WidgetAnnotation#justification is not specified.
VariableTextJustification | null
void
get keyPress():
ActionJavaScript|null
Gets or sets a JavaScript action to be performed when the user types a keystroke into a text field or combo box or modifies the selection in a scrollable list box. This action can check the keystroke for validity and reject or modify it.
ActionJavaScript | null
set keyPress(
value):void
Gets or sets a JavaScript action to be performed when the user types a keystroke into a text field or combo box or modifies the selection in a scrollable list box. This action can check the keystroke for validity and reject or modify it.
ActionJavaScriptProperties | ActionJavaScript | null
void
get mappingName():
string|null
Gets or sets the mapping name to be used when exporting interactive form field data from the document.
string | null
set mappingName(
value):void
Gets or sets the mapping name to be used when exporting interactive form field data from the document.
string | null
void
get name():
string|null
Gets or sets the field's name.
string | null
set name(
value):void
Gets or sets the field's name.
string
void
get om():
ObjectManager
Gets the owner ObjectManager instance.
get owner():
FieldCollection|null
Gets the FieldCollection containing this field.
FieldCollection | null
get page():
PdfPage|null
Gets or sets the PdfPage containing this field. This property wraps the WidgetAnnotation#page property and functions identically to: this.widget.page = value;
Note that a field may have multiple associated annotations across different pages. These can be added and configured using the @widgets property.
PdfPage | null
set page(
value):void
Gets or sets the PdfPage containing this field. This property wraps the WidgetAnnotation#page property and functions identically to: this.widget.page = value;
Note that a field may have multiple associated annotations across different pages. These can be added and configured using the @widgets property.
PdfPage | null
void
get parent():
Field|null
Gets the parent field.
Field | null
get readOnly():
boolean
Gets or sets a value indicating whether the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
boolean
set readOnly(
value):void
Gets or sets a value indicating whether the user may not change the value of the field. Any associated widget annotations will not interact with the user; that is, they will not respond to mouse clicks or change their appearance in response to mouse motions. This flag is useful for fields whose values are computed or imported from a database.
boolean
void
get recalculateValue():
ActionJavaScript|null
Gets or sets a JavaScript action to be performed to recalculate the value of this field when that of another field changes.
ActionJavaScript | null
set recalculateValue(
value):void
Gets or sets a JavaScript action to be performed to recalculate the value of this field when that of another field changes.
ActionJavaScriptProperties | ActionJavaScript | null
void
get rect():
Rect
Gets or sets the rectangle that defines the location and size of the field on a page. This property wraps the WidgetAnnotation#rect property and functions identically to: this.widget.rect = value;
Note that a field may have multiple associated annotations across different pages. These can be added and configured using the @widgets property.
set rect(
value):void
Gets or sets the rectangle that defines the location and size of the field on a page. This property wraps the WidgetAnnotation#rect property and functions identically to: this.widget.rect = value;
Note that a field may have multiple associated annotations across different pages. These can be added and configured using the @widgets property.
void
get required():
boolean
Gets or sets a value indicating whether the field must have a value at the time it is exported by a ActionSubmitForm action.
boolean
set required(
value):void
Gets or sets a value indicating whether the field must have a value at the time it is exported by a ActionSubmitForm action.
boolean
void
get value():
string|number|boolean|number[] |null
Gets or sets the object value of this checkbox field.
Gets "false" if none of the associated widgets is checked. Otherwise gets "true" if all widgets use the same name for the checked appearance stream, or the name of the appearance stream that is used to display the checked state.
When set, if a Boolean value is specified, it is assigned as is to the checked state. If the assigned value is not a Boolean, it is converted to string and is interpreted as the name of the widget's appearance stream used to show the widget's checked state. If no such stream exists, the checkbox will show as unchecked.
string | number | boolean | number[] | null
set value(
value):void
Gets or sets the object value of this checkbox field.
Gets "false" if none of the associated widgets is checked. Otherwise gets "true" if all widgets use the same name for the checked appearance stream, or the name of the appearance stream that is used to display the checked state.
When set, if a Boolean value is specified, it is assigned as is to the checked state. If the assigned value is not a Boolean, it is converted to string and is interpreted as the name of the widget's appearance stream used to show the widget's checked state. If no such stream exists, the checkbox will show as unchecked.
string | number | boolean | number[] | null
void
get valueChanged():
ActionJavaScript|null
Gets or sets a JavaScript action to be performed when the field's value is changed. This action can check the new value for validity.
ActionJavaScript | null
set valueChanged(
value):void
Gets or sets a JavaScript action to be performed when the field's value is changed. This action can check the new value for validity.
ActionJavaScriptProperties | ActionJavaScript | null
void
get widget():
WidgetAnnotation
Gets the WidgetAnnotation defining view properties of the CheckBoxField.
get widgets():
FieldWidgetCollection
Gets the list of widget annotations associated with this field.
free():
void
Detaches the object from the ObjectManager and deallocates its memory, if possible.
void
rebind(
omTo):void
Rebinds the object from the current ObjectManager to the specified one.
The new ObjectManager for the object.
void