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
public class PDTextbox extends PDVariableText
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
Constructors Constructor Description PDTextbox(PDAcroForm theAcroForm)
PDTextbox(PDAcroForm theAcroForm, COSDictionary field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getMaxLen()
Returns the maximum number of characters of the text field.void
setMaxLen(int maxLen)
Sets the maximum number of characters of the text field.-
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 Detail
-
PDTextbox
public PDTextbox(PDAcroForm theAcroForm)
- Parameters:
theAcroForm
- The acroform.- See Also:
PDField(PDAcroForm,COSDictionary)
-
PDTextbox
public PDTextbox(PDAcroForm theAcroForm, COSDictionary field)
- Parameters:
theAcroForm
- The acroForm for this field.field
- The field's dictionary.- See Also:
PDField(PDAcroForm,COSDictionary)
-
-
Method Detail
-
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
-
-