Class PDTextbox
java.lang.Object
org.apache.pdfbox.pdmodel.interactive.form.PDField
org.apache.pdfbox.pdmodel.interactive.form.PDVariableText
org.apache.pdfbox.pdmodel.interactive.form.PDTextbox
- All Implemented Interfaces:
COSObjectable
A class for handling the PDF field as a textbox.
- Author:
- sug
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDVariableText
FLAG_COMB, FLAG_DO_NOT_SCROLL, FLAG_DO_NOT_SPELL_CHECK, FLAG_FILE_SELECT, FLAG_MULTILINE, FLAG_PASSWORD, FLAG_RICH_TEXT, QUADDING_CENTERED, QUADDING_LEFT, QUADDING_RIGHT
Fields inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDField
FLAG_NO_EXPORT, FLAG_READ_ONLY, FLAG_REQUIRED
-
Constructor Summary
ConstructorsConstructorDescriptionPDTextbox
(PDAcroForm theAcroForm) PDTextbox
(PDAcroForm theAcroForm, COSDictionary field) -
Method Summary
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDVariableText
doNotScroll, doNotSpellCheck, getDefaultAppearance, getQ, getValue, isFileSelect, isMultiline, isPassword, isRichText, setComb, setDoNotScroll, setDoNotSpellCheck, setFileSelect, setMultiline, setPassword, setQ, setRichText, setValue, shouldComb
Methods inherited from class org.apache.pdfbox.pdmodel.interactive.form.PDField
findFieldType, findKid, getAcroForm, getActions, getAlternateFieldName, getCOSObject, getDictionary, getFieldFlags, getFieldType, getFullyQualifiedName, getKids, getParent, getPartialName, getWidget, getWidgets, importFDF, isNoExport, isReadonly, isRequired, setAcroForm, setActions, setAlternateFieldName, setFieldFlags, setFieldType, setKids, setNoExport, setParent, setPartialName, setReadonly, setRequired, toString
-
Constructor Details
-
PDTextbox
- Parameters:
theAcroForm
- The acroform.- See Also:
-
PDTextbox
- Parameters:
theAcroForm
- The acroForm for this field.field
- The field's dictionary.- See Also:
-
-
Method Details
-
getMaxLen
public int getMaxLen()Returns the maximum number of characters of the text field.- Returns:
- the maximum number of characters, returns -1 if the value isn't present
-
setMaxLen
public void setMaxLen(int maxLen) Sets the maximum number of characters of the text field.- Parameters:
maxLen
- the maximum number of characters
-