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

(package private) PdfName
encoding
(package private) HashMap
fields
(package private) String
fileSpec

Fields inherited from class com.lowagie.text.pdf.PdfReader

acroForm, acroFormParsed, appendable, catalog, consolidateNamedDestinations, decrypt, encrypted, endobj, endstream, eofPos, fileLength, freeXref, hybridXref, lastXref, newHits, newXrefType, objGen, objNum, objStmMark, pValue, pageInh, pageInhCandidates, pageRefs, pages, password, pdfVersion, rValue, rebuilt, sharedStreams, strings, tampered, tokens, trailer, visited, vpints, vpnames, xref, xrefObj

Constructor Summary

FdfReader(InputStream is)
Reads an FDF form.
FdfReader(String filename)
Reads an FDF form.
FdfReader(URL url)
Reads an FDF form.
FdfReader(pdfIn[] )
Reads an FDF form.

Method Summary

PdfDictionary
getField(String name)
Gets the field dictionary.
String
getFieldValue(String name)
Gets the field value or null if the field does not exist or has no value defined.
HashMap
getFields()
Gets all the fields.
String
getFileSpec()
Gets the PDF file specification contained in the FDF.
protected void
kidNode(PdfDictionary merged, String name)
protected void
readFields()
protected void
readPdf()

Methods inherited from class com.lowagie.text.pdf.PdfReader

ASCII85Decode, ASCIIHexDecode, FlateDecode, FlateDecode, LZWDecode, PRSimpleRecursive, consolidateNamedDestinations, createFakeFontSubsets, decodePredictor, duplicatePdfDictionary, duplicatePdfObject, eliminateSharedStreams, ensureXrefSize, equalsArray, equalsn, existsName, getAcroFields, getAcroForm, getBoxSize, getCatalog, getCropBox, getDecrypt, getEofPos, getFileLength, getFontName, getInfo, getJavaScript, getJavaScript, getLastXref, getMetadata, getNameArray, getNamedDestination, getNamedDestinationFromNames, getNamedDestinationFromStrings, getNormalizedRectangle, getNumberOfPages, getPageContent, getPageContent, getPageN, getPageOrigRef, getPageRotation, getPageRotation, getPageSize, getPageSize, getPageSizeWithRotation, getPageSizeWithRotation, getPdfObject, getPdfObject, getPdfReaderInstance, getPdfVersion, getPermissions, getSafeFile, getStreamBytes, getStreamBytes, getSubsetPrefix, getTrailer, getViewerPreferences, getXrefSize, is128Key, isAppendable, isEncrypted, isHybridXref, isNewXrefType, isRebuilt, isTampered, iterateBookmarks, iteratePages, killIndirect, killXref, popPageAttributes, pushPageAttributes, readArray, readDecryptedDocObj, readDictionary, readDocObj, readObjStm, readPRObject, readPages, readPdf, readXRefStream, readXref, readXrefSection, rebuildXref, removeAnnotations, removeFields, removeUnusedNode, removeUnusedObjects, replaceNamedDestination, selectPages, selectPages, setAppendable, setPageContent, setTampered, setViewerPreferences, setViewerPreferences, shuffleSubsetNames

Field Details

encoding

(package private)  PdfName encoding

fields

(package private)  HashMap fields

fileSpec

(package private)  String fileSpec

Constructor Details

FdfReader

public FdfReader(InputStream is)
            throws IOException
Reads an FDF form.
Parameters:
is - the InputStream containing the document. The stream is read to the end but is not closed

FdfReader

public FdfReader(String filename)
            throws IOException
Reads an FDF form.
Parameters:
filename - the file name of the form

FdfReader

public FdfReader(URL url)
            throws IOException
Reads an FDF form.
Parameters:
url - the URL of the document

FdfReader

public FdfReader(pdfIn[] )
            throws IOException
Reads an FDF form.
Parameters:

Method Details

getField

public PdfDictionary getField(String name)
Gets the field dictionary.
Parameters:
name - the fully qualified field name
Returns:
the field dictionary

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

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

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()
            throws IOException

readPdf

protected void readPdf()
            throws IOException
Overrides:
readPdf in interface PdfReader