Package org.apache.pdfbox.pdfparser
Class PDFXrefStreamParser
java.lang.Object
org.apache.pdfbox.pdfparser.BaseParser
org.apache.pdfbox.pdfparser.PDFXrefStreamParser
This will parse a PDF 1.5 (or better) Xref stream and
extract the xref information from the stream.
- Version:
- $Revision: 1.0 $
- Author:
- Justin LeFebvre
-
Field Summary
Fields inherited from class org.apache.pdfbox.pdfparser.BaseParser
DEF, document, ENDOBJ, ENDSTREAM, forceParsing, pdfSource, PROP_PUSHBACK_SIZE
-
Constructor Summary
ConstructorsConstructorDescriptionPDFXrefStreamParser
(COSStream strm, COSDocument doc, boolean forceParsing, XrefTrailerResolver resolver) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
parse()
Parses through the unfiltered stream and populates the xrefTable HashMap.Methods inherited from class org.apache.pdfbox.pdfparser.BaseParser
clearResources, isClosing, isClosing, isEndOfName, isEOL, isEOL, isWhitespace, isWhitespace, parseBoolean, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSStream, parseCOSString, parseCOSString, parseDirObject, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, readUntilEndStream, setDocument, skipSpaces
-
Constructor Details
-
PDFXrefStreamParser
public PDFXrefStreamParser(COSStream strm, COSDocument doc, boolean forceParsing, XrefTrailerResolver resolver) throws IOException Constructor.- Parameters:
strm
- The stream to parse.doc
- The document for the current parsing.forceParsing
- flag to skip malformed or otherwise unparseable input where possibleresolver
- resolver to read the xref/trailer information- Throws:
IOException
- If there is an error initializing the stream.- Since:
- 1.3.0
-
-
Method Details
-
parse
Parses through the unfiltered stream and populates the xrefTable HashMap.- Throws:
IOException
- If there is an error while parsing the stream.
-