Browse our Products

Aspose.Slides for Android via Java 21.9 Release Notes

KeySummaryCategory
SLIDESANDROID-330Use Aspose.Slides for Java 21.9 featuresEnhancement

Public API Changes

HTML5 Export Support

We implemented support for HTML5 Export in Slides (enhanced customizable version of HTML5 Support).

The new Html5 value has been added to SaveFormat enumerations. This value represents the HTML5 format for exporting.

The code snippet below demonstrates the saving presentation in HTML5 operation:

Presentation presentation = new Presentation("SomePresentation.pptx");
try {
	presentation.save("index.html", SaveFormat.Html5);
} finally {
	if (presentation != null) presentation.dispose();
}

Using the Html5Options configuration, you can export a presentation containing slides transitions, animations, and shapes animations to HTML5:

Presentation pres = new Presentation("demo.pptx");
try {
	Html5Options html5Options = new Html5Options();
	html5Options.setAnimateShapes(true);
	html5Options.setAnimateTransitions(true);

	pres.save("demo-animate.html", SaveFormat.Html5, html5Options);
} finally {
	if (pres != null) pres.dispose();
}

Access to the ChartDataWorksheetCollection has been added

To provide access to worksheets, we added the IChartDataWorksheetCollection interface, ChartDataWorksheetCollection class, and IChartDataWorkbook.getWorksheets() method.

Presentation pres = new Presentation();
try {
	IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Pie, 50, 50, 400, 500);

	IChartDataWorkbook workbook =  chart.getChartData().getChartDataWorkbook();
	for (int i = 0; i < workbook.getWorksheets().size(); i++)
	{
		System.out.println(workbook.getWorksheets().get_Item(i).getName());
	}
} finally {
	if (pres != null) pres.dispose();
}

IAccessiblePVIObject interface has been added

IAccessiblePVIObject interface has been added. It represents a type that can be a source of an effective version of its data.

IAccessiblePVIObject declaration:

/**
 * <p>
 * Represents a type that can return corresponding effective data with the inheritance applied.
 * </p><p>Type of effective data.</p>
 */
public interface IAccessiblePVIObject<T>
{
    /**
     * <p>
     * Gets effective data with the inheritance applied.
     * </p>
     * @return An effective data object.
     */
    public T getEffective();
}

Currently, all effect types implement the IAccessiblePVIObject interface—and this means you can get effective values for effects with styled colors resolved.

This code demonstrates an operation where we added a picture for a slide background, added Duotone effect with styled colors, and then we got the effective duotone colors with which the background will be rendered:

Presentation presentation = new Presentation();
try {
    byte[] imageBytes = Files.readAllBytes(Paths.get("someimage.png"));
    IPPImage backgroundImage = presentation.getImages().addImage(imageBytes);

    presentation.getSlides().get_Item(0).getBackground().setType(BackgroundType.OwnBackground);
    presentation.getSlides().get_Item(0).getBackground().getFillFormat().setFillType(FillType.Picture);
    presentation.getSlides().get_Item(0).getBackground().getFillFormat().getPictureFillFormat().
            getPicture().setImage(backgroundImage);

    IDuotone duotone = presentation.getSlides().get_Item(0).getBackground().getFillFormat().
            getPictureFillFormat().getPicture().getImageTransform().addDuotoneEffect();

    duotone.getColor1().setColorType(ColorType.Scheme);
    duotone.getColor1().setSchemeColor(SchemeColor.Accent1);
    duotone.getColor2().setColorType(ColorType.Scheme);
    duotone.getColor2().setSchemeColor(SchemeColor.Dark2);

    IDuotoneEffectiveData duotoneEffective = duotone.getEffective();

    System.out.println("Duotone effective color1: " + duotoneEffective.getColor1());
    System.out.println("Duotone effective color2: " + duotoneEffective.getColor2());
} catch(IOException e) {
} finally {
    if (presentation != null) presentation.dispose();
}