PdfSaveOptions

Inheritance: java.lang.Object, 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

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

Methods

Method Description
copyOutputPropertiesFrom(SaveOptions source) {@inheritDoc}
deepClone() {@inheritDoc}
getCompliance() Gets a desired compliance level for generated PDF document.
getDefaultFontName() Gets the default font for rendering.
getEncryptionDetails() Gets an encryption details.
getFontResolveCallback() Gets a callback which can be used to customize resolved fonts.
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.
getUseProjectDefaultFont() Gets a value indicating whether the default font must be used for rendering.
setCompliance(int value) Sets a desired compliance level for generated PDF document.
setDefaultFontName(String value) Sets the default font for rendering.
setEncryptionDetails(PdfEncryptionDetails value) Sets a encryption details.
setFontResolveCallback(FontResolveCallbackDelegate value) Sets a callback which can be used to customize resolved fonts.
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.
setUseProjectDefaultFont(boolean value) Sets a value indicating whether the default font must be used for rendering.

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:

Parameter Type Description
source SaveOptions {@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.

getDefaultFontName()

public final String getDefaultFontName()

Gets the default font for rendering.

Returns: java.lang.String - the default font for rendering.

getEncryptionDetails()

public final PdfEncryptionDetails getEncryptionDetails()

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

Returns: PdfEncryptionDetails - an encryption details.

getFontResolveCallback()

public final FontResolveCallbackDelegate getFontResolveCallback()

Gets a callback which can be used to customize resolved fonts.

Returns: FontResolveCallbackDelegate - a callback which can be used to customize resolved fonts.

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.

getUseProjectDefaultFont()

public final boolean getUseProjectDefaultFont()

Gets a value indicating whether the default font must be used for rendering.

Returns: boolean - a value indicating whether the default font must be used for rendering.

setCompliance(int value)

public final void setCompliance(int value)

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

Parameters:

Parameter Type Description
value int a desired compliance level for generated PDF document.

setDefaultFontName(String value)

public final void setDefaultFontName(String value)

Sets the default font for rendering.

Parameters:

Parameter Type Description
value java.lang.String the default font for rendering.

setEncryptionDetails(PdfEncryptionDetails value)

public final void setEncryptionDetails(PdfEncryptionDetails value)

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

Parameters:

Parameter Type Description
value PdfEncryptionDetails a encryption details.

setFontResolveCallback(FontResolveCallbackDelegate value)

public final void setFontResolveCallback(FontResolveCallbackDelegate value)

Sets a callback which can be used to customize resolved fonts.

Parameters:

Parameter Type Description
value FontResolveCallbackDelegate a callback which can be used to customize resolved fonts.

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:

Parameter Type Description
value IPageSavingCallback a 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:

Parameter Type Description
value java.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:

Parameter Type Description
value boolean a 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:

Parameter Type Description
value boolean a 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:

Parameter Type Description
value int a compression type to be used for all content streams except images.

setUseProjectDefaultFont(boolean value)

public final void setUseProjectDefaultFont(boolean value)

Sets a value indicating whether the default font must be used for rendering.

Parameters:

Parameter Type Description
value boolean a value indicating whether the default font must be used for rendering.