PdfSaveOptions

Inheritance: java.lang.Object, com.aspose.tasks.SimpleSaveOptions, com.aspose.tasks.SaveOptions

All Implemented Interfaces: com.aspose.tasks.SaveOptions.IReduceBottomGap, com.aspose.tasks.SaveOptions.IFontCallbacks, com.aspose.tasks.ICloneableSaveOptions

public class PdfSaveOptions extends SaveOptions implements SaveOptions.IReduceBottomGap, SaveOptions.IFontCallbacks, ICloneableSaveOptions

Allows to specify additional options when rendering project pages to PDF.

Constructors

ConstructorDescription
PdfSaveOptions()Initializes a new instance of the PdfSaveOptions class that can be used to save a document in the SaveFileFormat format.

Methods

MethodDescription
copyOutputPropertiesFrom(SaveOptions source){@inheritDoc}
deepClone(){@inheritDoc}
getCompliance()Gets a desired compliance level for generated PDF document.
getEncryptionDetails()Gets an encryption details.
getFontSettings()Specifies font settings used when rendering project’s view.
getPageSavingCallback()Gets a user-defined callback which is used to get an output stream for each rendered page.
getPages()Gets the list of pages numbers to save when saving project layout to separate files.
getReduceFooterGap()Gets a value indicating whether a gap between last task and the footer must be reduced.
getSaveToSeparateFiles()Gets a value indicating whether to save project pages to separate files.
getTextCompression()Gets a compression type to be used for all content streams except images.
setCompliance(int value)Sets a desired compliance level for generated PDF document.
setEncryptionDetails(PdfEncryptionDetails value)Sets a encryption details.
setPageSavingCallback(IPageSavingCallback value)Sets a user-defined callback which is used to get an output stream for each rendered page.
setPages(List<Integer> value)Sets the list of pages numbers to save when saving project layout to separate files.
setReduceFooterGap(boolean value)Sets a value indicating whether a gap between last task and the footer must be reduced.
setSaveToSeparateFiles(boolean value)Sets a value indicating whether to save project pages to separate files.
setTextCompression(int value)Sets a compression type to be used for all content streams except images.

PdfSaveOptions()

public PdfSaveOptions()

Initializes a new instance of the PdfSaveOptions class that can be used to save a document in the SaveFileFormat format.

copyOutputPropertiesFrom(SaveOptions source)

public void copyOutputPropertiesFrom(SaveOptions source)

Reserved for internal usage.

Parameters:

ParameterTypeDescription
sourceSaveOptions{@inheritDoc}

deepClone()

public SaveOptions deepClone()

Reserved for internal usage.

Returns: SaveOptions - {@inheritDoc}

getCompliance()

public final int getCompliance()

Gets a desired compliance level for generated PDF document. Default is PdfCompliance.Pdf15.

Returns: int - a desired compliance level for generated PDF document.

getEncryptionDetails()

public final PdfEncryptionDetails getEncryptionDetails()

Gets an encryption details. If not set, then no encryption will be performed.

Returns: PdfEncryptionDetails - an encryption details.

getFontSettings()

public final FontSettings getFontSettings()

Specifies font settings used when rendering project’s view.

Returns: FontSettings - font settings.

getPageSavingCallback()

public final IPageSavingCallback getPageSavingCallback()

Gets a user-defined callback which is used to get an output stream for each rendered page. Is applicable when SaveToSeparateFiles(getSaveToSeparateFiles()/setSaveToSeparateFiles(boolean)) option is used.

Returns: IPageSavingCallback - a user-defined callback which is used to get an output stream for each rendered page.

getPages()

public final List<Integer> getPages()

Gets the list of pages numbers to save when saving project layout to separate files.


All pages will be saved if this list is empty.

Returns: java.util.List<java.lang.Integer> - the list of pages numbers to save when saving project layout to separate files.

getReduceFooterGap()

public final boolean getReduceFooterGap()

Gets a value indicating whether a gap between last task and the footer must be reduced.

Returns: boolean - a value indicating whether a gap between last task and the footer must be reduced.

getSaveToSeparateFiles()

public final boolean getSaveToSeparateFiles()

Gets a value indicating whether to save project pages to separate files.

Returns: boolean - a value indicating whether to save project pages to separate files.

getTextCompression()

public final int getTextCompression()

Gets a compression type to be used for all content streams except images. Default is PdfTextCompression.Flate.

Returns: int - a compression type to be used for all content streams except images.

setCompliance(int value)

public final void setCompliance(int value)

Sets a desired compliance level for generated PDF document. Default is PdfCompliance.Pdf15.

Parameters:

ParameterTypeDescription
valueinta desired compliance level for generated PDF document.

setEncryptionDetails(PdfEncryptionDetails value)

public final void setEncryptionDetails(PdfEncryptionDetails value)

Sets a encryption details. If not set, then no encryption will be performed.

Parameters:

ParameterTypeDescription
valuePdfEncryptionDetailsa encryption details.

setPageSavingCallback(IPageSavingCallback value)

public final void setPageSavingCallback(IPageSavingCallback value)

Sets a user-defined callback which is used to get an output stream for each rendered page. Is applicable when SaveToSeparateFiles(getSaveToSeparateFiles()/setSaveToSeparateFiles(boolean)) option is used.

Parameters:

ParameterTypeDescription
valueIPageSavingCallbacka user-defined callback which is used to get an output stream for each rendered page.

setPages(List<Integer> value)

public final void setPages(List<Integer> value)

Sets the list of pages numbers to save when saving project layout to separate files.


All pages will be saved if this list is empty.

Parameters:

ParameterTypeDescription
valuejava.util.List<java.lang.Integer>the list of pages numbers to save when saving project layout to separate files.

setReduceFooterGap(boolean value)

public final void setReduceFooterGap(boolean value)

Sets a value indicating whether a gap between last task and the footer must be reduced.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether a gap between last task and the footer must be reduced.

setSaveToSeparateFiles(boolean value)

public final void setSaveToSeparateFiles(boolean value)

Sets a value indicating whether to save project pages to separate files.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether to save project pages to separate files.

setTextCompression(int value)

public final void setTextCompression(int value)

Sets a compression type to be used for all content streams except images. Default is PdfTextCompression.Flate.

Parameters:

ParameterTypeDescription
valueinta compression type to be used for all content streams except images.