Class CosSaveParams
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.cos.CosSaveParams
-
- All Implemented Interfaces:
java.lang.Cloneable
public class CosSaveParams extends java.lang.Object implements java.lang.Cloneable
-
-
Field Summary
Fields Modifier and Type Field Description static intCURRENT_XREFstatic intSAVE_STYLE_DEFAULTstatic intSAVE_STYLE_FULLstatic intSAVE_STYLE_INCREMENTALstatic intSAVE_STYLE_LINEARstatic intXREFHYBRIDstatic intXREFSTREAMstatic intXREFTABLE
-
Constructor Summary
Constructors Constructor Description CosSaveParams(int saveStyle)Constructor with specified save style.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Produce a simple, shallow clone.booleangetCloseAfterSave()Returns true if document to be closed after save.java.util.MapgetExtensions()Returns version extensions.booleangetForceCompress()Returns true if force compression to be used.java.lang.StringgetHeader()Returns header.java.lang.StringgetHeaderToken()Returns header token.intgetSaveStyle()Returns save style to save with.booleangetSaveToCopy()Save the CosDocument to the ByteWriter given during save but do NOT make it the backing store and continue to use the existing one.ByteWritergetTempByteWriter()Only for internal engineering use.java.lang.StringgetVersion()Returns version to save with.intgetXrefStyle()Returns xref style to save with.voidsetCloseAfterSave(boolean closeAfterSave)Sets true if document to be closed after save.voidsetExtensions(java.util.Map extensions)Sets version extensions to use.voidsetForceCompress(boolean forceCompress)Specifies if force compression to be used.voidsetHeader(java.lang.String header)Sets header to sue while saving.voidsetHeaderToken(java.lang.String headerToken)Sets header token.voidsetSaveStyle(int saveStyle)Sets save style to save with.voidsetSaveToCopy(boolean saveToCopy)Save the CosDocument to the ByteWriter given during save but do NOT make it the backing store and continue to use the existing one.voidsetTempByteWriter(ByteWriter tempByteWriter)Only for internal engineering use.voidsetVersion(java.lang.String version)Sets version to save with.voidsetXrefStyle(int xrefstyle)
-
-
-
Field Detail
-
CURRENT_XREF
public static final int CURRENT_XREF
- See Also:
- Constant Field Values
-
XREFTABLE
public static final int XREFTABLE
- See Also:
- Constant Field Values
-
XREFSTREAM
public static final int XREFSTREAM
- See Also:
- Constant Field Values
-
XREFHYBRID
public static final int XREFHYBRID
- See Also:
- Constant Field Values
-
SAVE_STYLE_DEFAULT
public static final int SAVE_STYLE_DEFAULT
- See Also:
- Constant Field Values
-
SAVE_STYLE_INCREMENTAL
public static final int SAVE_STYLE_INCREMENTAL
- See Also:
- Constant Field Values
-
SAVE_STYLE_FULL
public static final int SAVE_STYLE_FULL
- See Also:
- Constant Field Values
-
SAVE_STYLE_LINEAR
public static final int SAVE_STYLE_LINEAR
- See Also:
- Constant Field Values
-
-
Method Detail
-
setHeader
public void setHeader(java.lang.String header)
Sets header to sue while saving.
-
getHeader
public java.lang.String getHeader()
Returns header.
-
setHeaderToken
public void setHeaderToken(java.lang.String headerToken) throws PDFInvalidParameterExceptionSets header token.- Throws:
PDFInvalidParameterException
-
getHeaderToken
public java.lang.String getHeaderToken()
Returns header token.
-
setVersion
public void setVersion(java.lang.String version)
Sets version to save with.
-
getVersion
public java.lang.String getVersion()
Returns version to save with.
-
getExtensions
public java.util.Map getExtensions()
Returns version extensions.
-
setExtensions
public void setExtensions(java.util.Map extensions)
Sets version extensions to use.
-
setXrefStyle
public void setXrefStyle(int xrefstyle)
- Parameters:
xrefstyle- - int enum for specifying full save xref style: CURRENT_XREF - use existing style (default for existing document) XREFTABLE - xref table (default for new document) XREFSTREAM - xref stream (required if compressed object streams) XREFHYBRID - hybrid (compressed object streams only visible to v 1.5 or later)
-
getXrefStyle
public int getXrefStyle()
Returns xref style to save with.
-
setSaveStyle
public void setSaveStyle(int saveStyle)
Sets save style to save with.
-
getSaveStyle
public int getSaveStyle()
Returns save style to save with.
-
setCloseAfterSave
public void setCloseAfterSave(boolean closeAfterSave)
Sets true if document to be closed after save.
-
getCloseAfterSave
public boolean getCloseAfterSave()
Returns true if document to be closed after save.
-
setForceCompress
public void setForceCompress(boolean forceCompress)
Specifies if force compression to be used.
-
getForceCompress
public boolean getForceCompress()
Returns true if force compression to be used.
-
setTempByteWriter
public void setTempByteWriter(ByteWriter tempByteWriter)
Only for internal engineering use. This api can change without notice.
-
getTempByteWriter
public ByteWriter getTempByteWriter()
Only for internal engineering use. This api can change without notice.
-
setSaveToCopy
public void setSaveToCopy(boolean saveToCopy)
Save the CosDocument to the ByteWriter given during save but do NOT make it the backing store and continue to use the existing one.- Parameters:
saveToCopy- will document be saved as a copy
-
getSaveToCopy
public boolean getSaveToCopy()
Save the CosDocument to the ByteWriter given during save but do NOT make it the backing store and continue to use the existing one.
-
clone
public java.lang.Object clone()
Produce a simple, shallow clone.
-
-