Public API and Backwards Incompatible Changes in Aspose.Slides for Java 15.9.0

Public API Changes

renderToGraphics methods were added to com.aspose.slides.ISlide, Slide

The following methods have been added:

renderToGraphics(boolean withNotes, java.awt.Graphics2D graphics, int width, int height); renderToGraphics(boolean withNotes, java.awt.Graphics2D graphics, float scale); renderToGraphics(boolean withNotes, java.awt.Graphics2D graphics); were added to com.aspose.slides.ISlide interface and to com.aspose.slides.Slide class. These methods allow render a slide to specified Graphics2D object.

The renderToGraphics methods have since been removed from the public API. In current versions, render a slide with ISlide.getImage, as the example below does:

import com.aspose.slides.*;
import java.awt.Dimension;

Presentation pres = new Presentation("SomePresentation.pptx");

try {

	IImage slideImage = pres.getSlides().get_Item(0).getImage(new Dimension(960, 720));

	try {

		slideImage.save("slide.png", ImageFormat.Png);

	} finally {

		slideImage.dispose();

	}

} finally {

	if (pres != null) pres.dispose();

}