java.lang.Object
org.sejda.sambox.cos.COSBase
org.sejda.sambox.cos.COSDocument
- All Implemented Interfaces:
COSObjectable
This is the in-memory representation of the PDF document.
- Author:
- Ben Litchfield
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(COSVisitor visitor) Visitor pattern for the COS model objectsGet the encryption dictionary if the document is encrypted or null if the document is not encrypted.booleanvoidvoidsetEncryptionDictionary(COSDictionary dictionary) Set the encryption dictionary, this should only be called when encrypting the document.voidsetHeaderVersion(String headerVersion) Sets the version of the PDF specification to write to the file header.Methods inherited from class org.sejda.sambox.cos.COSBase
getCOSObject, hasId, id, idIfAbsent
-
Constructor Details
-
COSDocument
public COSDocument() -
COSDocument
-
-
Method Details
-
setHeaderVersion
Sets the version of the PDF specification to write to the file header. File header is defined in Chap 7.5.2 of PDF 32000-1:2008- Parameters:
headerVersion-
-
getHeaderVersion
- Returns:
- the version of the PDF specification retrieved from the file header. File header is defined in Chap 7.5.2 of PDF 32000-1:2008
-
isEncrypted
public boolean isEncrypted()- Returns:
- true If this document has an encryption dictionary
-
getEncryptionDictionary
Get the encryption dictionary if the document is encrypted or null if the document is not encrypted.- Returns:
- The encryption dictionary.
-
setEncryptionDictionary
Set the encryption dictionary, this should only be called when encrypting the document.- Parameters:
dictionary- The encryption dictionary.
-
getDocumentID
-
setDocumentID
-
getCatalog
- Returns:
- the catalog for this document
- Throws:
IllegalStateException- If no catalog can be found.
-
getTrailer
-
accept
Description copied from class:COSBaseVisitor pattern for the COS model objects- Specified by:
acceptin classCOSBase- Throws:
IOException
-