Class XfdfReader
java.lang.Object
com.gitlab.pdftk_java.com.lowagie.text.pdf.XfdfReader
- All Implemented Interfaces:
SimpleXMLDocHandler
Reads a XFDF.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXfdfReader(byte[] xfdfIn) Reads an XFDF form.XfdfReader(InputStream fin) XfdfReader(String filename) Reads an XFDF form. -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled after the document is parsed.voidendElement(String tag) Called when an end tag is found.Gets the field value.getFieldRichValue(String name) Gets all the fields.getFieldValue(String name) Gets the field value ornullif the field does not exist or has no value defined.Gets the PDF file specification contained in the FDF.getListValues(String name) Gets the field values for a list ornullif the field does not exist or has no value defined.voidCalled when the document starts to be parsed.voidstartElement(String tag, HashMap h) Called when a start tag is found.voidCalled when a text element is found.
-
Field Details
-
Constructor Details
-
XfdfReader
Reads an XFDF form.- Parameters:
filename- the file name of the form- Throws:
IOException- on error
-
XfdfReader
- Throws:
IOException
-
XfdfReader
Reads an XFDF form.- Parameters:
xfdfIn- the byte array with the form- Throws:
IOException- on error
-
-
Method Details
-
getFields
Gets all the fields. The map is keyed by the fully qualified field name and the value is a mergedPdfDictionarywith the field content.- Returns:
- all the fields
-
getField
-
getFieldValue
-
getListValues
-
getFieldRichValue
-
getFileSpec
Gets the PDF file specification contained in the FDF.- Returns:
- the PDF file specification contained in the FDF
-
startElement
Called when a start tag is found.- Specified by:
startElementin interfaceSimpleXMLDocHandler- Parameters:
tag- the tag nameh- the tag's attributes
-
endElement
Called when an end tag is found.- Specified by:
endElementin interfaceSimpleXMLDocHandler- Parameters:
tag- the tag name
-
startDocument
public void startDocument()Called when the document starts to be parsed.- Specified by:
startDocumentin interfaceSimpleXMLDocHandler
-
endDocument
public void endDocument()Called after the document is parsed.- Specified by:
endDocumentin interfaceSimpleXMLDocHandler
-
text
Called when a text element is found.- Specified by:
textin interfaceSimpleXMLDocHandler- Parameters:
str- the text element, probably a fragment.
-