public class PDFParser extends COSParser
A, ASCII_CR, ASCII_LF, B, D, DEF, document, E, ENDOBJ_STRING, ENDSTREAM_STRING, J, M, N, O, R, S, seqSource, STREAM_STRING, TEOF_MARKER, fileLen, initialParseDone, OBJ_MARKER, securityHandler, source, SYSPROP_EOFLOOKUPRANGE, SYSPROP_PARSEMINIMAL, TMP_FILE_PREFIX, xrefTrailerResolver| Constructor | Description |
|---|---|
PDFParser(RandomAccessRead source) |
Constructor.
|
PDFParser(RandomAccessRead source,
java.lang.String decryptionPassword) |
Constructor.
|
PDFParser(RandomAccessRead source,
java.lang.String decryptionPassword,
java.io.InputStream keyStore,
java.lang.String alias) |
Constructor.
|
PDFParser(RandomAccessRead source,
java.lang.String decryptionPassword,
java.io.InputStream keyStore,
java.lang.String alias,
ScratchFile scratchFile) |
Constructor.
|
PDFParser(RandomAccessRead source,
java.lang.String decryptionPassword,
ScratchFile scratchFile) |
Constructor.
|
PDFParser(RandomAccessRead source,
ScratchFile scratchFile) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
PDDocument |
getPDDocument() |
This will get the PD document that was parsed.
|
protected 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.
|
void |
parse() |
This will parse the stream and populate the COSDocument object.
|
isClosing, isClosing, isDigit, isDigit, isEndOfName, isEOL, isEOL, isSpace, isSpace, isWhitespace, isWhitespace, parseBoolean, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSString, parseDirObject, readExpectedChar, readExpectedString, readExpectedString, readGenerationNumber, readInt, readLine, readLong, readObjectNumber, readString, readString, readStringNumber, skipSpaces, skipWhiteSpacescheckPages, getDocument, getStartxrefOffset, isCatalog, isLenient, lastIndexOf, parseCOSStream, parseDictObjects, parseFDFHeader, parseObjectDynamically, parseObjectDynamically, parsePDFHeader, parseTrailerValuesDynamically, parseXref, parseXrefTable, rebuildTrailer, retrieveTrailer, setEOFLookupRange, setLenientpublic PDFParser(RandomAccessRead source) throws java.io.IOException
source - source representing the pdf.java.io.IOException - If something went wrong.public PDFParser(RandomAccessRead source, ScratchFile scratchFile) throws java.io.IOException
source - input representing the pdf.scratchFile - use a ScratchFile for temporary storage.java.io.IOException - If something went wrong.public PDFParser(RandomAccessRead source, java.lang.String decryptionPassword) throws java.io.IOException
source - input representing the pdf.decryptionPassword - password to be used for decryption.java.io.IOException - If something went wrong.public PDFParser(RandomAccessRead source, java.lang.String decryptionPassword, ScratchFile scratchFile) throws java.io.IOException
source - input representing the pdf.decryptionPassword - password to be used for decryption.scratchFile - use a ScratchFile for temporary storage.java.io.IOException - If something went wrong.public PDFParser(RandomAccessRead source, java.lang.String decryptionPassword, java.io.InputStream keyStore, java.lang.String alias) throws java.io.IOException
source - input representing the pdf.decryptionPassword - password to be used for decryption.keyStore - key store to be used for decryption when using public key securityalias - alias to be used for decryption when using public key securityjava.io.IOException - If something went wrong.public PDFParser(RandomAccessRead source, java.lang.String decryptionPassword, java.io.InputStream keyStore, java.lang.String alias, ScratchFile scratchFile) throws java.io.IOException
source - input representing the pdf.decryptionPassword - password to be used for decryption.keyStore - key store to be used for decryption when using public key securityalias - alias to be used for decryption when using public key securityscratchFile - buffer handler for temporary storage; it will be closed on
COSDocument.close()java.io.IOException - If something went wrong.public PDDocument getPDDocument() throws java.io.IOException
java.io.IOException - If there is an error getting the document.protected void initialParse()
throws InvalidPasswordException,
java.io.IOException
InvalidPasswordException - If the password is incorrect.java.io.IOException - If something went wrong.public void parse()
throws InvalidPasswordException,
java.io.IOException
InvalidPasswordException - If the password is incorrect.java.io.IOException - If there is an error reading from the stream or corrupt data
is found.Copyright © 2002–2018. All rights reserved.