Top Fields Constructors Methods
org.apache.pdfbox.pdfparser

public Class FDFParser

extends COSParser
Class Inheritance
Imports
java.io.IOException, org.apache.pdfbox.cos.COSDictionary, .COSName, org.apache.pdfbox.io.IOUtils, .RandomAccessRead, org.apache.pdfbox.pdmodel.fdf.FDFDocument

Field Summary

Inherited from org.apache.pdfbox.pdfparser.COSParser:
EOF_MARKERfileLeninitialParseDoneOBJ_MARKERsecurityHandlerSYSPROP_EOFLOOKUPRANGExrefTrailerResolver

Constructor Summary

AccessConstructor and Description
public
FDFParser(RandomAccessRead
the source of the pdf to be parsed
source
)

Constructs parser for given file using memory buffer.

Method Summary

Modifier and TypeMethod and Description
private void
initialParse()

The initial parse will first parse only the trailer, the xrefstart and all xref tables to have a pointer (offset) to all the pdf's objects.

public FDFDocument

Returns:

the parsed FDFDocument
parse
()

This will parse the stream and populate the FDFDocument object.

Inherited from org.apache.pdfbox.pdfparser.COSParser:
checkPagescreateRandomAccessReadViewdereferenceCOSObjectgetAccessPermissiongetEncryptionisLenientisStringlastIndexOfparseCOSStreamparseFDFHeaderparseObjectDynamicallyparseObjectStreamObjectparsePDFHeaderparseXrefTableprepareDecryptionresetTrailerResolverretrieveTrailersetEOFLookupRangesetLenient

Constructor Detail

FDFParserback to summary
public FDFParser(RandomAccessRead source) throws IOException

Constructs parser for given file using memory buffer.

Parameters
source:RandomAccessRead

the source of the pdf to be parsed

Exceptions
IOException:
If something went wrong.

Method Detail

initialParseback to summary
private void initialParse() throws IOException

The initial parse will first parse only the trailer, the xrefstart and all xref tables to have a pointer (offset) to all the pdf's objects. It can handle linearized pdfs, which will have an xref at the end pointing to an xref at the beginning of the file. Last the root object is parsed.

Exceptions
IOException:
If something went wrong.
parseback to summary
public FDFDocument parse() throws IOException

This will parse the stream and populate the FDFDocument object.

Returns:FDFDocument

the parsed FDFDocument

Exceptions
IOException:
If there is an error reading from the stream or corrupt data is found.