public class PDFParser extends COSParser
EOF_MARKER, fileLen, initialParseDone, OBJ_MARKER, securityHandler, SYSPROP_EOFLOOKUPRANGE, SYSPROP_PARSEMINIMAL, TMP_FILE_PREFIX, xrefTrailerResolverA, ASCII_CR, ASCII_LF, ASCII_SPACE, B, D, DEF, document, E, ENDOBJ_STRING, ENDSTREAM_STRING, J, M, N, O, pdfSource, PROP_PUSHBACK_SIZE, R, S, STREAM_STRING, T, validationParsing| Constructor and Description |
|---|
PDFParser(RandomAccessRead source)
Constructor.
|
PDFParser(RandomAccessRead source,
boolean useScratchFiles)
Constructor.
|
PDFParser(RandomAccessRead source,
String decryptionPassword)
Constructor.
|
PDFParser(RandomAccessRead source,
String decryptionPassword,
boolean useScratchFiles)
Constructor.
|
PDFParser(RandomAccessRead source,
String decryptionPassword,
InputStream keyStore,
String alias)
Constructor.
|
PDFParser(RandomAccessRead source,
String decryptionPassword,
InputStream keyStore,
String alias,
boolean useScratchFiles)
Constructor.
|
PDFParser(RandomAccessRead source,
String decryptionPassword,
InputStream keyStore,
String alias,
boolean useScratchFiles,
boolean validationParsing)
Constructor.
|
| Modifier and Type | Method and 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.
|
getDocument, getFirstTrailer, getLastTrailer, getStartxrefOffset, isLenient, isLinearized, lastIndexOf, parseCOSStream, parseDictObjects, parseFDFHeader, parseObjectDynamically, parseObjectDynamically, parsePDFHeader, parseSuspensionObjects, parseTrailerValuesDynamically, parseXref, parseXrefTable, rebuildTrailer, setEOFLookupRange, setLenientisClosing, isClosing, isDigit, isDigit, isEndOfName, isEOL, isEOL, isSpace, isSpace, isWhitespace, isWhitespace, parseBoolean, parseCOSArray, parseCOSDictionary, parseCOSName, parseCOSString, parseDirObject, readExpectedChar, readExpectedString, readExpectedString, readGenerationNumber, readInt, readLine, readLineWithoutWhitespacesSkip, readLong, readObjectNumber, readString, readString, readStringNumber, skipSpaces, skipWhiteSpacespublic PDFParser(RandomAccessRead source) throws IOException
source - source representing the pdf.IOException - If something went wrong.public PDFParser(RandomAccessRead source, boolean useScratchFiles) throws IOException
source - input representing the pdf.useScratchFiles - use a file based buffer for temporary storage.IOException - If something went wrong.public PDFParser(RandomAccessRead source, String decryptionPassword) throws IOException
source - input representing the pdf.decryptionPassword - password to be used for decryption.IOException - If something went wrong.public PDFParser(RandomAccessRead source, String decryptionPassword, boolean useScratchFiles) throws IOException
source - input representing the pdf.decryptionPassword - password to be used for decryption.useScratchFiles - use a file based buffer for temporary storage.IOException - If something went wrong.public PDFParser(RandomAccessRead source, String decryptionPassword, InputStream keyStore, String alias) throws 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 securityIOException - If something went wrong.public PDFParser(RandomAccessRead source, String decryptionPassword, InputStream keyStore, String alias, boolean useScratchFiles) throws 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 securityuseScratchFiles - use a buffer for temporary storage.IOException - If something went wrong.public PDFParser(RandomAccessRead source, String decryptionPassword, InputStream keyStore, String alias, boolean useScratchFiles, boolean validationParsing) throws 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 securityuseScratchFiles - use a buffer for temporary storage.validationParsing - true if need to use validation parserIOException - If something went wrong.public PDDocument getPDDocument() throws IOException
IOException - If there is an error getting the document.protected void initialParse()
throws IOException
IOException - If something went wrong.public void parse()
throws IOException
IOException - If there is an error reading from the stream or corrupt data
is found.Copyright © 2015–2019 The veraPDF Consortium. All rights reserved.