Browse our Products

Aspose.Slides for Android via Java 20.1 Release Notes

SLIDESANDROID-235Use Aspose.Slides for Java 20.1 featuresFeature

Public API Changes

ISaveOptions.setDefaultRegularFont and ISaveOptions.getDefaultRegularFont methods have been added

A new methods setDefaultRegularFont() and getDefaultRegularFont() have been added to ISaveOptions interface and SaveOptions abstract class. It allows to get or set the default font used instead of all missing fonts during saving presentations to different formats without reloading the presentations with different LoadOptions.

The code snippet below demonstrates saving presentation to HTML and PDF with different default regular font.

Presentation pres = new Presentation("SomePresentation.pptx");
    HtmlOptions htmlOpts = new HtmlOptions();
    htmlOpts.setDefaultRegularFont("Arial Black");"SomePresentation-out-ArialBlack.html", SaveFormat.Html, htmlOpts);
	htmlOpts.setDefaultRegularFont("Lucida Console");"Somepresentation-out-LucidaConsole.html", SaveFormat.Html, htmlOpts);

    PdfOptions pdfOpts = new PdfOptions();
    pdfOpts.setDefaultRegularFont("Arial Black");"SomePresentation-out-ArialBlack.pdf", SaveFormat.Pdf, pdfOpts);
} finally {
    if (pres != null) pres.dispose();