public class COSWriterCompressionPool extends Object
PDDocument.| Modifier and Type | Field and Description |
|---|---|
static float |
MINIMUM_SUPPORTED_VERSION |
| Constructor and Description |
|---|
COSWriterCompressionPool(PDDocument document,
CompressParameters parameters)
Constructs an object that can be used to compress the contents of a given
PDDocument. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(COSBase object)
Returns true, if the given
COSBase is a registered object of this compression pool. |
List<COSWriterObjectStream> |
createObjectStreams()
Creates
COSWriterObjectStreams for all currently registered objects of this pool, that have been marked
as fit for being compressed in this manner. |
long |
getHighestXRefObjectNumber()
Returns the highest object number, that is registered in this compression pool.
|
COSObjectKey |
getKey(COSBase object)
Returns the
COSObjectKey, that is registered for the given COSBase in this compression pool. |
COSBase |
getObject(COSObjectKey key)
Returns the
COSBase, that is registered for the given COSObjectKey in this compression pool. |
List<COSObjectKey> |
getObjectStreamObjects()
Returns all
COSBases that can be appended to an object stream. |
List<COSObjectKey> |
getTopLevelObjects()
Returns all
COSBases, that must be added to the document's top level container. |
public static final float MINIMUM_SUPPORTED_VERSION
public COSWriterCompressionPool(PDDocument document, CompressParameters parameters) throws IOException
Constructs an object that can be used to compress the contents of a given PDDocument. It provides the
means to:
COSBases to compressed
COSWriterObjectStreamsdocument - The document, that shall be compressed.parameters - The configuration of the compression operations, that shall be applied.IOException - Shall be thrown if a compression operation failed.public List<COSObjectKey> getTopLevelObjects()
COSBases, that must be added to the document's top level container. Those objects are not
valid to be added to an object stream.COSBases.public List<COSObjectKey> getObjectStreamObjects()
COSBases that can be appended to an object stream. This list is only provided to enable
reflections. Contained objects should indeed be added to a compressed document via an object stream, as can be
created via calling: createObjectStreams()COSBases, that can be added to an object stream.public boolean contains(COSBase object)
COSBase is a registered object of this compression pool.object - The object, that shall be checked.COSBase is a registered object of this compression pool.public COSObjectKey getKey(COSBase object)
COSObjectKey, that is registered for the given COSBase in this compression pool.object - The COSBase a COSObjectKey is registered for in this compression pool.COSObjectKey, that is registered for the given COSBase in this compression pool, if
such an object is contained.public COSBase getObject(COSObjectKey key)
COSBase, that is registered for the given COSObjectKey in this compression pool.key - The COSObjectKey a COSBase is registered for in this compression pool.COSBase, that is registered for the given COSObjectKey in this compression pool, if
such an object is contained.public long getHighestXRefObjectNumber()
public List<COSWriterObjectStream> createObjectStreams()
COSWriterObjectStreams for all currently registered objects of this pool, that have been marked
as fit for being compressed in this manner. Such object streams may be added to a PDF document and shall be
declared in a document's PDFXRefStream accordingly. The objects contained in such a stream must not be
added to the document separately.COSWriterObjectStreams for all currently registered compressible objects.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.