[]
Represents a text field.
new TextField(om): TextField;
Creates a new TextField.
ObjectManager that controls the lifetime of the TextField.
TextField
Field.constructor
new TextField(): TextField;
Creates a new TextField.
TextField
Field.constructor
get alternateName(): string;
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
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
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 children(): FieldCollection;
Gets the list of child fields.
get defaultStyleString(): string;
Gets or sets the default style string used when the field value is specified using TextField#richTextValue. See PDF specification for details. Note that DsPdfJS does not automatically regenerates appearance streams for text fields containing RTF text.
string
set defaultStyleString(value): void;
Gets or sets the default style string used when the field value is specified using TextField#richTextValue. See PDF specification for details. Note that DsPdfJS does not automatically regenerates appearance streams for text fields containing RTF text.
string
void
get defaultText(): string;
Gets or sets the default text of this TextField, applied when the field is reset.
string
set defaultText(value): void;
Gets or sets the default text of this TextField, applied when the field is reset.
string
void
get defaultValue(): string | number | boolean | number[];
Gets or sets the field's default value.
string | number | boolean | number[]
set defaultValue(value): void;
Gets or sets the field's default value.
string | number | boolean | number[]
void
get doc(): PdfDocument;
Gets the PdfDocument owning this field.
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;
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.
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
void
get id(): number;
Gets the reference to the object.
number
get justification(): VariableTextJustification;
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.
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.
void
get keyPress(): ActionJavaScript;
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.
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
void
get mappingName(): string;
Gets or sets the mapping name to be used when exporting interactive form field data from the document.
string
set mappingName(value): void;
Gets or sets the mapping name to be used when exporting interactive form field data from the document.
string
void
get maxLen(): number;
Gets or sets the maximum length of the field's text, in characters.
number
set maxLen(value): void;
Gets or sets the maximum length of the field's text, in characters.
number
void
get multiline(): boolean;
Gets or sets a value indicating whether the field can contain multiple lines of text.
boolean
set multiline(value): void;
Gets or sets a value indicating whether the field can contain multiple lines of text.
boolean
void
get name(): string;
Gets or sets the field's name.
string
set name(value): void;
Gets or sets the field's name.
string
void
get om(): ObjectManager;
Gets the owner ObjectManager instance.
get owner(): FieldCollection;
Gets the FieldCollection containing this field.
get page(): PdfPage;
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.
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.
void
get parent(): Field;
Gets the parent field.
get password(): boolean;
Gets or sets a value indicating whether the field is intended for entering a secure password that should not be echoed visibly to the screen.
boolean
set password(value): void;
Gets or sets a value indicating whether the field is intended for entering a secure password that should not be echoed visibly to the screen.
boolean
void
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;
Gets or sets a JavaScript action to be performed to recalculate the value of this field when that of another field changes.
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
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 richText(): boolean;
Gets or sets a value indicating whether the value of this field should be represented as a rich text string.
boolean
set richText(value): void;
Gets or sets a value indicating whether the value of this field should be represented as a rich text string.
boolean
void
get richTextValue(): string;
Gets or sets the rich text to be displayed in the TextField. This text can be formatted using HTML tags, see PDF specification for details. Note that DsPdfJS does not automatically regenerates appearance streams for text fields containing RTF text.
string
set richTextValue(value): void;
Gets or sets the rich text to be displayed in the TextField. This text can be formatted using HTML tags, see PDF specification for details. Note that DsPdfJS does not automatically regenerates appearance streams for text fields containing RTF text.
string
void
get scrollable(): boolean;
Gets or sets a value indicating whether the field is scrollable to accommodate more text than fits within its annotation rectangle.
boolean
set scrollable(value): void;
Gets or sets a value indicating whether the field is scrollable to accommodate more text than fits within its annotation rectangle.
boolean
void
get spellCheck(): boolean;
Gets or sets a value indicating whether the text entered in the field is spell-checked.
boolean
set spellCheck(value): void;
Gets or sets a value indicating whether the text entered in the field is spell-checked.
boolean
void
get text(): string;
Gets or sets the text of TextField.
string
set text(value): void;
Gets or sets the text of TextField.
string
void
get value(): string | number | boolean | number[];
Gets or sets the field's value.
string | number | boolean | number[]
set value(value): void;
Gets or sets the field's value.
string | number | boolean | number[]
void
get valueChanged(): ActionJavaScript;
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.
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
void
get widget(): WidgetAnnotation;
Gets the WidgetAnnotation defining view properties of the text field.
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