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

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.
getDefaultFontName()Gets the default (or fallback) 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 (or fallback) 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:

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.

getDefaultFontName()

public final String getDefaultFontName()

Gets the default (or fallback) font for rendering.

Returns: java.lang.String - the default (or fallback) 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.


When the value is False and DefaultFontName is specified, the rendering engine will utilize the font specified by DefaultFontName as a fallback font. Otherwise ‘Arial’ (if installed) or ‘Generic Sans Serif’ fonts are used as a fallback font. The fallback font is utilized during the rendering of project view when a text style references a font that is not installed on the current operating system. For greater control over font resolution you can use FontResolveCallback (getFontResolveCallback/setFontResolveCallback(FontResolveCallbackDelegate)) callback.

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:

ParameterTypeDescription
valueinta desired compliance level for generated PDF document.

setDefaultFontName(String value)

public final void setDefaultFontName(String value)

Sets the default (or fallback) font for rendering.

Parameters:

ParameterTypeDescription
valuejava.lang.Stringthe default (or fallback) 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:

ParameterTypeDescription
valuePdfEncryptionDetailsa encryption details.

setFontResolveCallback(FontResolveCallbackDelegate value)

public final void setFontResolveCallback(FontResolveCallbackDelegate value)

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

Parameters:

ParameterTypeDescription
valueFontResolveCallbackDelegatea 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:

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.

setUseProjectDefaultFont(boolean value)

public final void setUseProjectDefaultFont(boolean value)

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


When the value is False and DefaultFontName is specified, the rendering engine will utilize the font specified by DefaultFontName as a fallback font. Otherwise ‘Arial’ (if installed) or ‘Generic Sans Serif’ fonts are used as a fallback font. The fallback font is utilized during the rendering of project view when a text style references a font that is not installed on the current operating system. For greater control over font resolution you can use FontResolveCallback (getFontResolveCallback/setFontResolveCallback(FontResolveCallbackDelegate)) callback.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether the default font must be used for rendering.