Class FdfReader
java.lang.Object
com.itextpdf.text.pdf.PdfReader
com.itextpdf.text.pdf.FdfReader
- All Implemented Interfaces:
PdfViewerPreferences
Reads an FDF form and makes the fields available
-
Nested Class Summary
Nested classes/interfaces inherited from class PdfReader
PdfReader.PageRefs -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static Counter(package private) PdfName(package private) HashMap<String, PdfDictionary> (package private) StringFields inherited from class PdfReader
acroForm, acroFormParsed, catalog, certificate, certificateKey, certificateKeyProvider, consolidateNamedDestinations, debugmode, decrypt, encrypted, endobj, endstream, eofPos, externalDecryptionProcess, freeXref, lastXref, memoryLimitsAwareHandler, newXrefType, objStmMark, objStmToOffset, pageInhCandidates, pageRefs, password, pdfVersion, pValue, rebuilt, remoteToLocalNamedDestinations, rootPages, rValue, sharedStreams, strings, tampered, tokens, trailer, unethicalreading, xref, xrefObj -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]getAttachedFile(String name) Gets a byte[] containing a file that is embedded in the FDF.protected CounterGets the field dictionary.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.protected voidkidNode(PdfDictionary merged, String name) protected voidprotected voidreadPdf()Parses the entire PDFMethods inherited from class PdfReader
addPdfObject, addViewerPreference, ASCII85Decode, ASCII85Decode, ASCIIHexDecode, ASCIIHexDecode, close, computeUserPassword, consolidateNamedDestinations, createFakeFontSubsets, decodeBytes, decodeBytes, decodePredictor, dumpPerc, duplicatePdfDictionary, duplicatePdfObject, eliminateSharedStreams, equalsn, existsName, FlateDecode, FlateDecode, FlateDecode, getAcroFields, getAcroForm, getBoxSize, getCatalog, getCertificationLevel, getCropBox, getCryptoMode, getCryptoRef, getDecrypt, getEofPos, getFileLength, getFontName, getInfo, getJavaScript, getJavaScript, getLastXref, getLinks, getMemoryLimitsAwareHandler, getMetadata, getNamedDestination, getNamedDestination, getNamedDestinationFromNames, getNamedDestinationFromNames, getNamedDestinationFromStrings, getNormalizedRectangle, getNumberOfPages, getPageContent, getPageContent, getPageContent, getPageN, getPageNRelease, getPageOrigRef, getPageResources, getPageResources, getPageRotation, getPageRotation, getPageSize, getPageSize, getPageSizeWithRotation, getPageSizeWithRotation, getPdfObject, getPdfObject, getPdfObject, getPdfObjectRelease, getPdfObjectRelease, getPdfObjectRelease, getPdfReaderInstance, getPdfVersion, getPermissions, getSafeFile, getSimpleViewerPreferences, getStreamBytes, getStreamBytes, getStreamBytesRaw, getStreamBytesRaw, getSubsetPrefix, getTrailer, getXrefSize, hasUsageRights, is128Key, isAppendable, isEncrypted, isHybridXref, isMetadataEncrypted, isNewXrefType, isOpenedWithFullPermissions, isRebuilt, isTagged, isTampered, killIndirect, killXref, LZWDecode, 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, selectPages, setAppendable, setPageContent, setPageContent, setPageContent, setTampered, setViewerPreferences, setViewerPreferences, shuffleSubsetNames
-
Field Details
-
fields
HashMap<String, PdfDictionary> fields -
fileSpec
String fileSpec -
encoding
PdfName encoding -
COUNTER
-
-
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
-
getCounter
- Overrides:
getCounterin classPdfReader
-
readPdf
Description copied from class:PdfReaderParses the entire PDF- Overrides:
readPdfin classPdfReader- Throws:
IOException
-
kidNode
-
readFields
protected void readFields() -
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
Gets the field dictionary.- Parameters:
name- the fully qualified field name- Returns:
- the field dictionary
-
getAttachedFile
Gets a byte[] containing a file that is embedded in the FDF.- Parameters:
name- the fully qualified field name- Returns:
- the bytes of the file
- Throws:
IOException- Since:
- 5.0.1
-
getFieldValue
-
getFileSpec
Gets the PDF file specification contained in the FDF.- Returns:
- the PDF file specification contained in the FDF
-