Package com.aowagie.text.pdf
Class PRAcroForm
- java.lang.Object
-
- com.aowagie.text.pdf.PdfObject
-
- com.aowagie.text.pdf.PdfDictionary
-
- com.aowagie.text.pdf.PRAcroForm
-
public class PRAcroForm extends PdfDictionary
This class captures an AcroForm on input. Basically, it extends Dictionary by indexing the fields of an AcroForm
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PRAcroForm.FieldInformation
This class holds the information for a single field
-
Field Summary
Fields Modifier and Type Field Description private java.util.HashMap
fieldByName
private java.util.ArrayList
fields
private PdfReader
reader
private java.util.ArrayList
stack
-
Fields inherited from class com.aowagie.text.pdf.PdfDictionary
CATALOG, hashMap, OUTLINES, PAGE
-
Fields inherited from class com.aowagie.text.pdf.PdfObject
ARRAY, BOOLEAN, bytes, DICTIONARY, INDIRECT, NAME, NOTHING, NULL, NUMBER, STREAM, STRING, TEXT_PDFDOCENCODING, TEXT_UNICODE, type
-
-
Constructor Summary
Constructors Constructor Description PRAcroForm(PdfReader reader)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.ArrayList
getFields()
private void
iterateFields(PdfArray fieldlist, PRIndirectReference fieldDict, java.lang.String title)
After reading, we index all of the fields.private PdfDictionary
mergeAttrib(PdfDictionary parent, PdfDictionary child)
merge field attributes from two dictionariesprivate void
pushAttrib(PdfDictionary dict)
stack a level of dictionary.(package private) void
readAcroForm(PdfDictionary root)
Read, and comprehend the acroformint
size()
Number of fields found-
Methods inherited from class com.aowagie.text.pdf.PdfDictionary
contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, remove, toPdf, toString
-
Methods inherited from class com.aowagie.text.pdf.PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, setContent, setIndRef, type
-
-
-
-
Field Detail
-
fields
private final java.util.ArrayList fields
-
stack
private final java.util.ArrayList stack
-
fieldByName
private final java.util.HashMap fieldByName
-
reader
private final PdfReader reader
-
-
Constructor Detail
-
PRAcroForm
PRAcroForm(PdfReader reader)
Constructor- Parameters:
reader
- reader of the input file
-
-
Method Detail
-
size
public int size()
Number of fields found- Overrides:
size
in classPdfDictionary
- Returns:
- size
-
getFields
public java.util.ArrayList getFields()
-
readAcroForm
void readAcroForm(PdfDictionary root)
Read, and comprehend the acroform- Parameters:
root
- the document root
-
iterateFields
private void iterateFields(PdfArray fieldlist, PRIndirectReference fieldDict, java.lang.String title)
After reading, we index all of the fields. Recursive.- Parameters:
fieldlist
- An array of fieldsfieldDict
- the last field dictionary we encountered (recursively)title
- the pathname of the field, up to this point or null
-
mergeAttrib
private PdfDictionary mergeAttrib(PdfDictionary parent, PdfDictionary child)
merge field attributes from two dictionaries- Parameters:
parent
- one dictionarychild
- the other dictionary- Returns:
- a merged dictionary
-
pushAttrib
private void pushAttrib(PdfDictionary dict)
stack a level of dictionary. Merge in a dictionary from this level
-
-