java.lang.Object
org.sejda.sambox.input.PDFParser
Provides public entry point to parse a
SeekableSource and obtain a PDDocument or
IncrementablePDDocument.- Author:
- Andrea Vacondio
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PDDocumentparse(org.sejda.io.SeekableSource source) Parses the givenSeekableSourcereturning the correspondingPDDocument.static PDDocumentParses the givenSeekableSourceusing the given password, returning the corresponding decryptedPDDocument.static PDDocumentparse(org.sejda.io.SeekableSource source, DecryptionMaterial decryptionMaterial) Parses the givenSeekableSourceusing the givenDecryptionMaterial, returning the corresponding decryptedPDDocument.static IncrementablePDDocumentparseToIncrement(org.sejda.io.SeekableSource source) Parses the givenSeekableSourcereturning the correspondingIncrementablePDDocument.static IncrementablePDDocumentparseToIncrement(org.sejda.io.SeekableSource source, String password) Parses the givenSeekableSourceusing the given password, , returning the corresponding decryptedIncrementablePDDocumentto be used for an incremental update.static IncrementablePDDocumentparseToIncrement(org.sejda.io.SeekableSource source, DecryptionMaterial decryptionMaterial) Parses the givenSeekableSourceusing the givenDecryptionMaterial, returning the corresponding decryptedIncrementablePDDocumentto be used for an incremental update.
-
Constructor Details
-
PDFParser
public PDFParser()
-
-
Method Details
-
parse
Parses the givenSeekableSourcereturning the correspondingPDDocument.- Parameters:
source-- Returns:
- the parsed document
- Throws:
IOException
-
parseToIncrement
public static IncrementablePDDocument parseToIncrement(org.sejda.io.SeekableSource source) throws IOException Parses the givenSeekableSourcereturning the correspondingIncrementablePDDocument.- Parameters:
source-- Returns:
- the incrementable document
- Throws:
IOException
-
parse
public static PDDocument parse(org.sejda.io.SeekableSource source, String password) throws IOException Parses the givenSeekableSourceusing the given password, returning the corresponding decryptedPDDocument.- Parameters:
source-SeekableSourceto parsepassword- to be used for decryption. Optional.- Returns:
- the parsed document
- Throws:
IOException
-
parseToIncrement
public static IncrementablePDDocument parseToIncrement(org.sejda.io.SeekableSource source, String password) throws IOException Parses the givenSeekableSourceusing the given password, , returning the corresponding decryptedIncrementablePDDocumentto be used for an incremental update.- Parameters:
source-SeekableSourceto parsepassword- to be used for decryption. Optional.- Returns:
- the incrementable document
- Throws:
IOException
-
parse
public static PDDocument parse(org.sejda.io.SeekableSource source, DecryptionMaterial decryptionMaterial) throws IOException Parses the givenSeekableSourceusing the givenDecryptionMaterial, returning the corresponding decryptedPDDocument.- Parameters:
source-SeekableSourceto parsedecryptionMaterial- to be used for decryption. Optional.- Returns:
- the parsed document
- Throws:
IOException
-
parseToIncrement
public static IncrementablePDDocument parseToIncrement(org.sejda.io.SeekableSource source, DecryptionMaterial decryptionMaterial) throws IOException Parses the givenSeekableSourceusing the givenDecryptionMaterial, returning the corresponding decryptedIncrementablePDDocumentto be used for an incremental update.- Parameters:
source-SeekableSourceto parsedecryptionMaterial- to be used for decryption. Optional.- Returns:
- the incrementable document
- Throws:
IOException
-