Class PRAcroForm
java.lang.Object
com.itextpdf.text.pdf.PdfObject
com.itextpdf.text.pdf.PdfDictionary
com.itextpdf.text.pdf.PRAcroForm
- All Implemented Interfaces:
Serializable
This class captures an AcroForm on input. Basically, it extends Dictionary
by indexing the fields of an AcroForm
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThis class holds the information for a single field -
Field Summary
FieldsModifier and TypeFieldDescription(package private) HashMap<String, PRAcroForm.FieldInformation> (package private) ArrayList<PRAcroForm.FieldInformation> (package private) PdfReader(package private) ArrayList<PdfDictionary> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetRefByName(String name) Given the title (/T) of a reference, return the associated referenceprotected voiditerateFields(PdfArray fieldlist, PRIndirectReference fieldDict, String parentPath) After reading, we index all of the fields.protected PdfDictionarymergeAttrib(PdfDictionary parent, PdfDictionary child) merge field attributes from two dictionariesprotected voidpushAttrib(PdfDictionary dict) stack a level of dictionary.voidreadAcroForm(PdfDictionary root) Read, and comprehend the acroformintsize()Number of fields foundMethods inherited from class PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, toPdf, toStringMethods inherited from class PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Field Details
-
fields
ArrayList<PRAcroForm.FieldInformation> fields -
stack
ArrayList<PdfDictionary> stack -
fieldByName
HashMap<String, PRAcroForm.FieldInformation> fieldByName -
reader
PdfReader reader
-
-
Constructor Details
-
PRAcroForm
-
-
Method Details
-
size
-
getFields
-
getField
-
getRefByName
Given the title (/T) of a reference, return the associated reference- Parameters:
name- a string containing the path- Returns:
- a reference to the field, or null
-
readAcroForm
Read, and comprehend the acroform- Parameters:
root- the document root
-
iterateFields
After reading, we index all of the fields. Recursive.- Parameters:
fieldlist- An array of fieldsfieldDict- the last field dictionary we encountered (recursively)parentPath- the pathname of the field, up to this point or null
-
mergeAttrib
merge field attributes from two dictionaries- Parameters:
parent- one dictionarychild- the other dictionary- Returns:
- a merged dictionary
-
pushAttrib
stack a level of dictionary. Merge in a dictionary from this level
-