| java.lang.Object | ||
| ↳ | com.pspdfkit.forms.FormElement | |
| ↳ | com.pspdfkit.forms.TextFormElement | |
Represents a text control in a PDF form. Allows the user to enter custom text.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| TextFormField |
getFormField()
Retrieve parent form field.
| ||||||||||
| String |
getFormattedContents()
Returns the formatted contents of this form element based on rules in the annotation (including JavaScript)
| ||||||||||
| TextInputFormat |
getInputFormat()
Input format of this text field.
| ||||||||||
| int |
getMaxLength()
Maximum length of text allowed in the text field.
| ||||||||||
| String |
getRichText()
Current rich text value.
| ||||||||||
| String |
getText()
Current text value.
| ||||||||||
| FormType |
getType()
Gets form type for
TextFormElement. | ||||||||||
| boolean |
isComb()
Returns whether the field shall be automatically divided into as many equally space positions,
or combs, as the value of
getMaxLength(), and the text is laid out into those combs. | ||||||||||
| boolean |
isFileSelect()
Returns whether text entered in the field represents the pathname of a file whose contents
shall be submitted as the value of the field.
| ||||||||||
| boolean |
isMultiLine()
Returns whether text is allowed to have multiple lines or not.
| ||||||||||
| boolean |
isPassword()
Returns whether text is intended for entering a secure password that should not be visible on the screen.
| ||||||||||
| boolean |
isRichText()
Returns whether the value of this field can be a rich text string.
| ||||||||||
| boolean |
isScrollEnabled()
Returns whether the text field can be scrolled (horizontally for single-line fields, vertically for multi-line fields).
| ||||||||||
| boolean |
isSpellCheckEnabled()
Returns whether text entered in the field shall be spell-checked.
| ||||||||||
| void |
setRichText(String richText)
Sets the current rich text value.
| ||||||||||
| boolean |
setText(String text)
Sets the current text value.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.pspdfkit.forms.FormElement
| |||||||||||
From class
java.lang.Object
| |||||||||||
Retrieve parent form field.
Returns the formatted contents of this form element based on rules in the annotation (including JavaScript)
null if contents could not be formatted.
Input format of this text field.
Maximum length of text allowed in the text field.
Current rich text value.
null if no rich text has been set.
Current text value.
null if no text has been set.
Gets form type for TextFormElement. See FormType.
TextFormElement.
Returns whether the field shall be automatically divided into as many equally space positions,
or combs, as the value of getMaxLength(), and the text is laid out into those combs.
true when dividing into combs is enabled.
Returns whether text entered in the field represents the pathname of a file whose contents shall be submitted as the value of the field.
true when file selection dialog should appear and file content should be uploaded.
Returns whether text is allowed to have multiple lines or not.
true when text is allowed to span multiple lines.
Returns whether text is intended for entering a secure password that should not be visible on the screen.
true when text should be not echoed on screen.
Returns whether the value of this field can be a rich text string.
true when field supports rich text content.Returns whether the text field can be scrolled (horizontally for single-line fields, vertically for multi-line fields). Once the field is full, no further text shall be accepted for interactive form filling. For non-interactive form filling, the filler should take care not to add more character than will visibly fit in the defined area.
true when text scrolling is enabled.
Returns whether text entered in the field shall be spell-checked.
true when text content can be spell checked.
Sets the current text value.
true if the text field's text was updated, otherwise false.