java.lang.Object
org.openpdf.text.pdf.PdfReader
org.openpdf.text.pdf.FdfReader
- All Implemented Interfaces:
Closeable,AutoCloseable,PdfViewerPreferences
Reads an FDF form and makes the fields available
- Author:
- Paulo Soares (psoares@consiste.pt)
-
Field Summary
Fields inherited from class org.openpdf.text.pdf.PdfReader
acroForm, acroFormParsed, catalog, certificate, certificateKey, certificateKeyProvider, consolidateNamedDestinations, decrypt, encrypted, eofPos, freeXref, lastXref, newXrefType, objStmMark, objStmToOffset, pageRefs, password, pdfVersion, pValue, rebuilt, remoteToLocalNamedDestinations, rValue, sharedStreams, strings, tampered, tokens, trailer, xref -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets all the fields.Gets the field dictionary.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.protected voidkidNode(PdfDictionary merged, String name) protected voidprotected voidreadPdf()Methods inherited from class org.openpdf.text.pdf.PdfReader
addPdfObject, addViewerPreference, ASCII85Decode, ASCIIHexDecode, close, computeUserPassword, consolidateNamedDestinations, convertPdfNull, createFakeFontSubsets, decodePredictor, dumpPerc, duplicatePdfDictionary, duplicatePdfObject, eliminateSharedStreams, FlateDecode, FlateDecode, getAcroFields, getAcroForm, getBoxSize, getCatalog, getCertificationLevel, getCropBox, getCryptoMode, getDocumentId, getEofPos, getFileLength, getInfo, getJavaScript, getJavaScript, getLastXref, getLinks, getMetadata, getNamedDestination, getNamedDestination, getNamedDestinationFromNames, getNamedDestinationFromNames, getNamedDestinationFromStrings, getNormalizedRectangle, getNumberOfPages, getPageContent, getPageContent, getPageN, getPageNRelease, getPageOrigRef, getPageRotation, getPageSize, getPageSize, getPageSizeWithRotation, getPageSizeWithRotation, getPageSizeWithRotation, getPdfObject, getPdfObject, getPdfObject, getPdfObjectNullConverting, getPdfObjectRelease, getPdfObjectRelease, getPdfObjectRelease, getPdfObjectReleaseNullConverting, getPdfReaderInstance, getPdfVersion, getPermissions, getSafeFile, getSimpleViewerPreferences, getStreamBytes, getStreamBytes, getStreamBytesRaw, getStreamBytesRaw, getTrailer, getXrefSize, is128Key, isAppendable, isEncrypted, isHybridXref, isMetadataEncrypted, isModificationlowedWithoutOwnerPassword, isNewXrefType, isOpenedWithFullPermissions, isOwnerPasswordUsed, isRebuilt, isTampered, killIndirect, killXref, LZWDecode, makeRemoteNamedDestinationsLocal, readArray, readDictionary, readDocObj, readDocObjPartial, readObjStm, readOneObjStm, readPages, readPdfPartial, readPRObject, readSingleObject, readXref, readXrefSection, readXRefStream, rebuildXref, releaseLastXrefPartial, releaseLastXrefPartial, releasePage, removeAnnotations, removeFields, removeUnusedNode, removeUnusedObjects, removeUsageRights, resetLastXrefPartial, resetReleasePage, selectPages, selectPages, setAppendable, setModificationAllowedWithoutOwnerPassword, setPageContent, setPageContent, setPermissions, setTampered, setViewerPreferences, shuffleSubsetNames
-
Constructor Details
-
FdfReader
Reads an FDF form.- Parameters:
filename- the file name of the form- Throws:
IOException- on error
-
FdfReader
Reads an FDF form.- Parameters:
pdfIn- the byte array with the form- Throws:
IOException- on error
-
FdfReader
Reads an FDF form.- Parameters:
url- the URL of the document- Throws:
IOException- on error
-
FdfReader
Reads an FDF form.- Parameters:
is- theInputStreamcontaining the document. The stream is read to the end but is not closed- Throws:
IOException- on error
-
-
Method Details
-
readPdf
- Overrides:
readPdfin classPdfReader- Throws:
IOException
-
kidNode
-
readFields
protected void readFields() -
getAllFields
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
Gets the field dictionary.- Parameters:
name- the fully qualified field name- Returns:
- the field dictionary
-
getFieldValue
Gets the field value ornullif the field does not exist or has no value defined.- Parameters:
name- the fully qualified field name- Returns:
- the field value or
null
-
getFileSpec
Gets the PDF file specification contained in the FDF.- Returns:
- the PDF file specification contained in the FDF
-