public abstract class SaveOptions extends java.lang.Object implements ISaveOptions
Abstract class with options that control how a presentation is saved.
| Constructor and Description |
|---|
SaveOptions() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDefaultRegularFont()
Returns or sets font used in case source font is not found.
|
int |
getGradientStyle()
Returns or sets the visual style of the gradient.
|
IProgressCallback |
getProgressCallback()
Represents a callback object for saving progress updates in percentage.
|
boolean |
getSkipJavaScriptLinks()
Specifies whether to skip hyperlinks with JavaScript calls when saving the presentation.
|
IWarningCallback |
getWarningCallback()
Returns of sets an object which receives warnings and decides whether loading process will continue or will be aborted.
|
void |
setDefaultRegularFont(java.lang.String value)
Returns or sets font used in case source font is not found.
|
void |
setGradientStyle(int value)
Returns or sets the visual style of the gradient.
|
void |
setProgressCallback(IProgressCallback value)
Represents a callback object for saving progress updates in percentage.
|
void |
setSkipJavaScriptLinks(boolean value)
Specifies whether to skip hyperlinks with JavaScript calls when saving the presentation.
|
void |
setWarningCallback(IWarningCallback value)
Returns of sets an object which receives warnings and decides whether loading process will continue or will be aborted.
|
public final IWarningCallback getWarningCallback()
Returns of sets an object which receives warnings and decides whether loading process will continue or will be aborted.
Read/write IWarningCallback.
getWarningCallback in interface ISaveOptionspublic final void setWarningCallback(IWarningCallback value)
Returns of sets an object which receives warnings and decides whether loading process will continue or will be aborted.
Read/write IWarningCallback.
setWarningCallback in interface ISaveOptionspublic final IProgressCallback getProgressCallback()
Represents a callback object for saving progress updates in percentage.
See IProgressCallback.
getProgressCallback in interface ISaveOptionspublic final void setProgressCallback(IProgressCallback value)
Represents a callback object for saving progress updates in percentage.
See IProgressCallback.
setProgressCallback in interface ISaveOptionspublic final java.lang.String getDefaultRegularFont()
Returns or sets font used in case source font is not found.
Read-write String.
Presentation pres = new Presentation("SomePresentation.pptx"); try { HtmlOptions htmlOpts = new HtmlOptions(); htmlOpts.setDefaultRegularFont("Arial Black"); pres.save("SomePresentation-out-ArialBlack.html", SaveFormat.Html, htmlOpts); htmlOpts.setDefaultRegularFont("Lucida Console"); pres.save("Somepresentation-out-LucidaConsole.html", SaveFormat.Html, htmlOpts); PdfOptions pdfOpts = new PdfOptions(); pdfOpts.setDefaultRegularFont("Arial Black"); pres.save("SomePresentation-out-ArialBlack.pdf", SaveFormat.Pdf, pdfOpts); } finally { if (pres != null) pres.dispose(); }
getDefaultRegularFont in interface ISaveOptionspublic final void setDefaultRegularFont(java.lang.String value)
Returns or sets font used in case source font is not found.
Read-write String.
Presentation pres = new Presentation("SomePresentation.pptx"); try { HtmlOptions htmlOpts = new HtmlOptions(); htmlOpts.setDefaultRegularFont("Arial Black"); pres.save("SomePresentation-out-ArialBlack.html", SaveFormat.Html, htmlOpts); htmlOpts.setDefaultRegularFont("Lucida Console"); pres.save("Somepresentation-out-LucidaConsole.html", SaveFormat.Html, htmlOpts); PdfOptions pdfOpts = new PdfOptions(); pdfOpts.setDefaultRegularFont("Arial Black"); pres.save("SomePresentation-out-ArialBlack.pdf", SaveFormat.Pdf, pdfOpts); } finally { if (pres != null) pres.dispose(); }
setDefaultRegularFont in interface ISaveOptionspublic final int getGradientStyle()
Returns or sets the visual style of the gradient.
Read/write GradientStyle.
getGradientStyle in interface ISaveOptionspublic final void setGradientStyle(int value)
Returns or sets the visual style of the gradient.
Read/write GradientStyle.
setGradientStyle in interface ISaveOptionspublic final boolean getSkipJavaScriptLinks()
Specifies whether to skip hyperlinks with JavaScript calls when saving the presentation. Read/write boolean. The default value is false.
Example:Presentation pres = new Presentation("demo.pptx"); try { HtmlOptions htmlOptions = new HtmlOptions(); htmlOptions.setSkipJavaScriptLinks(true); pres.save("result_without_JavaScript_links.html", SaveFormat.Html, htmlOptions); } finally { if (pres != null) pres.dispose(); }
When this property is set to true, hyperlinks with JavaScript calls will be ignored while saving.
When this property is set to false, all hyperlinks will be saved.
getSkipJavaScriptLinks in interface ISaveOptionspublic final void setSkipJavaScriptLinks(boolean value)
Specifies whether to skip hyperlinks with JavaScript calls when saving the presentation. Read/write boolean. The default value is false.
Example:Presentation pres = new Presentation("demo.pptx"); try { HtmlOptions htmlOptions = new HtmlOptions(); htmlOptions.setSkipJavaScriptLinks(true); pres.save("result_without_JavaScript_links.html", SaveFormat.Html, htmlOptions); } finally { if (pres != null) pres.dispose(); }
When this property is set to true, hyperlinks with JavaScript calls will be ignored while saving.
When this property is set to false, all hyperlinks will be saved.
setSkipJavaScriptLinks in interface ISaveOptionsCopyright © 2004-2025 Aspose Pty Ltd. All Rights Reserved.