public class PdfTextFormField extends PdfFormField
Modifier and Type | Field and Description |
---|---|
static int |
FF_COMB |
static int |
FF_DO_NOT_SCROLL |
static int |
FF_DO_NOT_SPELL_CHECK |
static int |
FF_FILE_SELECT |
static int |
FF_RICH_TEXT |
ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, backgroundColor, borderColor, borderWidth, check, checkType, circle, color, cross, DA_COLOR, DA_FONT, DA_SIZE, DEFAULT_FONT_SIZE, diamond, FF_MULTILINE, FF_NO_EXPORT, FF_PASSWORD, FF_READ_ONLY, FF_REQUIRED, font, fontSize, form, HIDDEN, HIDDEN_BUT_PRINTABLE, img, MIN_FONT_SIZE, pdfAConformanceLevel, rotation, square, star, text, TYPE_CHECK, TYPE_CIRCLE, TYPE_CROSS, TYPE_DIAMOND, TYPE_SQUARE, TYPE_STAR, typeChars, VISIBLE, VISIBLE_BUT_DOES_NOT_PRINT, X_OFFSET
Modifier | Constructor and Description |
---|---|
protected |
PdfTextFormField(PdfDictionary pdfObject) |
protected |
PdfTextFormField(PdfDocument pdfDocument) |
protected |
PdfTextFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument) |
Modifier and Type | Method and Description |
---|---|
PdfName |
getFormType()
Returns Tx , the form type for textual form fields.
|
int |
getMaxLen()
Gets the maximum length of the field's text, in characters.
|
boolean |
isComb()
Meaningful only if the MaxLen entry is present in the text field dictionary and if the Multiline, Password, and FileSelect flags are clear.
|
boolean |
isFileSelect()
If true, the text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.
|
boolean |
isRichText()
If true, the value of this field should be represented as a rich text string.
|
boolean |
isScroll()
If true, the field scrolls (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle.
|
boolean |
isSpellCheck()
If true, text entered in the field is spell-checked.
|
PdfTextFormField |
setComb(boolean comb)
Meaningful only if the MaxLen entry is present in the text field dictionary and if the Multiline, Password, and FileSelect flags are clear.
|
PdfTextFormField |
setFileSelect(boolean fileSelect)
If true, the text entered in the field represents the pathname of a file whose contents are to be submitted as the value of the field.
|
PdfTextFormField |
setMaxLen(int maxLen)
Sets the maximum length of the field?s text, in characters.
|
PdfTextFormField |
setMultiline(boolean multiline)
If true, the field can contain multiple lines of text; if false, the field?s text is restricted to a single line.
|
PdfTextFormField |
setPassword(boolean password)
If true, the field is intended for entering a secure password that should not be echoed visibly to the screen.
|
PdfTextFormField |
setRichText(boolean richText)
If true, the value of this field should be represented as a rich text string.
|
PdfTextFormField |
setScroll(boolean scroll)
If true, the field scrolls (horizontally for single-line fields, vertically for multiple-line fields) to accommodate more text than fits within its annotation rectangle.
|
PdfTextFormField |
setSpellCheck(boolean spellCheck)
If true, text entered in the field is spell-checked.
|
addKid, addKid, createButton, createButton, createCheckBox, createCheckBox, createCheckBox, createChoice, createChoice, createChoice, createChoice, createChoice, createComboBox, createComboBox, createEmptyField, createList, createList, createMultilineText, createMultilineText, createMultilineText, createPushButton, createPushButton, createPushButton, createRadioButton, createRadioButton, createRadioGroup, createSignature, createSignature, createText, createText, createText, createText, createText, createText, createText, createText, drawBorder, drawButton, drawButton, drawCheckAppearance, drawCheckBox, drawCheckBox, drawMultiLineTextAppearance, drawMultiLineTextAppearance, drawPdfA1CheckAppearance, drawPdfA1RadioAppearance, drawPdfA2CheckAppearance, drawPdfACheckBox, drawPushButtonAppearance, drawPushButtonAppearance, drawRadioAppearance, drawRadioBorder, drawRadioField, drawTextAppearance, drawTextAppearance, generateDefaultAppearanceString, generateDefaultAppearanceString, getAdditionalAction, getAlternativeName, getAppearanceStates, getBorderWidth, getDefaultAppearance, getDefaultStyle, getDefaultValue, getDocument, getFieldFlag, getFieldFlags, getFieldName, getFont, getFontAndSize, getJustification, getKids, getMappingName, getOptions, getParent, getRect, getRichText, getValue, getValueAsString, getWidgets, isMultiline, isNoExport, isPassword, isReadOnly, isRequired, isWrappedObjectMustBeIndirect, makeFieldFlag, makeFormField, processOptions, processOptions, put, regenerateField, release, setAction, setAdditionalAction, setAlternativeName, setAppearance, setBackgroundColor, setBorderColor, setBorderStyle, setBorderWidth, setCheckType, setColor, setDefaultAppearance, setDefaultStyle, setDefaultValue, setFieldFlag, setFieldFlag, setFieldFlags, setFieldName, setFont, setFontAndSize, setFontSize, setFontSize, setFontSizeAutoScale, setJustification, setMappingName, setNoExport, setOptions, setPage, setParent, setReadOnly, setRequired, setRichText, setRotation, setValue, setValue, setValue, setValue, setValue, setVisibility, splitDAelements
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, flush, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static final int FF_FILE_SELECT
public static final int FF_DO_NOT_SPELL_CHECK
public static final int FF_DO_NOT_SCROLL
public static final int FF_COMB
public static final int FF_RICH_TEXT
protected PdfTextFormField(PdfDocument pdfDocument)
protected PdfTextFormField(PdfWidgetAnnotation widget, PdfDocument pdfDocument)
protected PdfTextFormField(PdfDictionary pdfObject)
public PdfName getFormType()
Tx
, the form type for textual form fields.
getFormType
in class PdfFormField
PdfName
public PdfTextFormField setMultiline(boolean multiline)
multiline
- whether or not the file can contain multiple lines of text
PdfTextFormField
public PdfTextFormField setPassword(boolean password)
password
- whether or not to obscure the typed characters
PdfTextFormField
public boolean isFileSelect()
public PdfTextFormField setFileSelect(boolean fileSelect)
fileSelect
- whether or not this field should represent a path
PdfTextFormField
public boolean isSpellCheck()
public PdfTextFormField setSpellCheck(boolean spellCheck)
spellCheck
- whether or not to spell-check
PdfTextFormField
public boolean isScroll()
public PdfTextFormField setScroll(boolean scroll)
scroll
- whether or not to allow longer texts
PdfTextFormField
public boolean isComb()
public PdfTextFormField setComb(boolean comb)
comb
- whether or not to enable combing
PdfTextFormField
public boolean isRichText()
public PdfTextFormField setRichText(boolean richText)
richText
- whether or not to represent text as rich text
PdfTextFormField
public int getMaxLen()
null
will be returned.
public PdfTextFormField setMaxLen(int maxLen)
maxLen
- the maximum text length
Copyright © 1998–2018 iText Group NV. All rights reserved.