com.lowagie.text.pdf

Class FdfReader

public class FdfReader extends PdfReader

Reads an FDF form and makes the fields available

Author: Paulo Soares (psoares@consiste.pt)

Field Summary
PdfNameencoding
HashMapfields
StringfileSpec
Constructor Summary
FdfReader(String filename)
Reads an FDF form.
FdfReader(byte[] pdfIn)
Reads an FDF form.
FdfReader(URL url)
Reads an FDF form.
FdfReader(InputStream is)
Reads an FDF form.
Method Summary
PdfDictionarygetField(String name)
Gets the field dictionary.
HashMapgetFields()
Gets all the fields.
StringgetFieldValue(String name)
Gets the field value or null if the field does not exist or has no value defined.
StringgetFileSpec()
Gets the PDF file specification contained in the FDF.
protected voidkidNode(PdfDictionary merged, String name)
protected voidreadFields()
protected voidreadPdf()

Field Detail

encoding

PdfName encoding

fields

HashMap fields

fileSpec

String fileSpec

Constructor Detail

FdfReader

public FdfReader(String filename)
Reads an FDF form.

Parameters: filename the file name of the form

Throws: IOException on error

FdfReader

public FdfReader(byte[] pdfIn)
Reads an FDF form.

Parameters: pdfIn the byte array with the form

Throws: IOException on error

FdfReader

public FdfReader(URL url)
Reads an FDF form.

Parameters: url the URL of the document

Throws: IOException on error

FdfReader

public FdfReader(InputStream is)
Reads an FDF form.

Parameters: is the InputStream containing the document. The stream is read to the end but is not closed

Throws: IOException on error

Method Detail

getField

public PdfDictionary getField(String name)
Gets the field dictionary.

Parameters: name the fully qualified field name

Returns: the field dictionary

getFields

public HashMap getFields()
Gets all the fields. The map is keyed by the fully qualified field name and the value is a merged PdfDictionary with the field content.

Returns: all the fields

getFieldValue

public String getFieldValue(String name)
Gets the field value or null if the field does not exist or has no value defined.

Parameters: name the fully qualified field name

Returns: the field value or null

getFileSpec

public String getFileSpec()
Gets the PDF file specification contained in the FDF.

Returns: the PDF file specification contained in the FDF

kidNode

protected void kidNode(PdfDictionary merged, String name)

readFields

protected void readFields()

readPdf

protected void readPdf()