Browse our Products

Aspose.Slides for Java 21.5 Release Notes

KeySummaryCategoryRelated Documentation
SLIDESNET-40842Support for Zoom for PowerPointFeaturehttps://docs.aspose.com/slides/net/manage-zoom/
SLIDESNET-42551Custom PPT root directory entry object class GUID (CLSID)Enhancementhttps://docs.aspose.com/slides/net/save-presentation/#save-presentation-to-file
SLIDESNET-40747Support for reading autofit scale valuesFeaturehttps://docs.aspose.com/slides/net/shape-effective-properties/
SLIDESNET-42479Running a macro by clicking a buttonFeature
SLIDESJAVA-38503Thumbnail image contains a text with thick and thin fontsBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-jpg/
SLIDESJAVA-38228Use Aspose.Slides for Net 21.5 featuresEnhancement
SLIDESJAVA-38443wrong font height is read for portions inside paragraphs of text frameBughttps://docs.aspose.com/slides/java/shape-effective-properties/
SLIDESJAVA-38442Font height of a text portion is wrongBughttps://docs.aspose.com/slides/java/shape-effective-properties/
SLIDESJAVA-37452Support for reading autofit scale valuesFeaturehttps://docs.aspose.com/slides/java/shape-effective-properties/
SLIDESJAVA-38504External URL from paragraph portion is incorrectBughttps://docs.aspose.com/slides/java/manage-hyperlinks/
SLIDESJAVA-38517Size of the generated PDF in Aspose.Slides is much larger than in PowerPointBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-pdf/
SLIDESJAVA-38496Aspose.Slides giving true for two unequal layout slidesBughttps://docs.aspose.com/slides/java/compare-slides/
SLIDESJAVA-38511Table borders are incorrect in cloned slideBughttps://docs.aspose.com/slides/java/clone-slides/
SLIDESJAVA-38500The text is not displayed correctly when converting PPTX to SVGBug
SLIDESJAVA-38502Unknown load format for presentationsBug
SLIDESJAVA-38476The time format is incorrect in a chartBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-jpg/
SLIDESJAVA-36943Incorrect font sizeBughttps://docs.aspose.com/slides/java/shape-effective-properties/
SLIDESJAVA-35211Arabic Text rendered incorrectly in generated PDFBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-pdf/
SLIDESJAVA-34880Table Alignment wrong on exported pdfBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-pdf/
SLIDESJAVA-34879Font in AutoShape gets bigger on pdfBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-pdf/
SLIDESJAVA-38524Font is wrong in thumbnail and PDF outputBughttps://docs.aspose.com/slides/java/convert-powerpoint-ppt-and-pptx-to-pdf/
SLIDESJAVA-38525Cloning slide throws NullPointerException in multi-threaded modeBughttps://docs.aspose.com/slides/java/clone-slides/

Public API Changes

Zoom support has been added

The main article on Zoom: Manage Zoom

When you create a Zoom transition in PowerPoint, you can jump to (and from) specific slides, sections, and portions of your presentation in any order you prefer when presenting:

Zoom in PowerPoint

In Aspose.Slides, to provide the same functionality, we added a new enum ZoomImageType, a new interface IZoomFrame, and some new additional methods in IShapeCollection.

ZoomImageType Enum

The ZoomImageType determines whether the Zoom object uses the slide preview or a cover image.

This is the ZoomImageType enum definition:

public final class ZoomImageType
{
	private ZoomImageType(){}	
    /**
     * Use the image of the slide or section.
     */
    public static final int Preview = 1;

    /**
     * Use a custom image.
     */
    public static final int Cover = 2;
}

IZoomFrame Interface

The IZoomFrame interface with the ZoomFrame implementation class has been added:

public interface IZoomFrame
{
    /**
     * Gets or sets the image type of a zoom object.
     * Read/write {@link ZoomImageType}.
     * Default value: Preview
     */
    public int getImageType();
    public void setImageType(int value);

    /**
     * Gets or sets the navigation behavior in slideshow.
     * Read/write {@code boolean}.
     * Default value: false
     */
    public boolean getReturnToParent();
    public void setReturnToParent(boolean value);

    /**
     * Gets or sets the slide object that the Slide Zoom object links to.
     * Read/write {@link ISlide}.
     */
    public ISlide getTargetSlide();
    public void setTargetSlide(ISlide value);

    /**
     * Gets or sets value that specifies whether the Zoom will use the background of the destination slide.
     * Read/write {@code boolean}.
     * Default value: true
     */
    public boolean getShowBackground();
    public void setShowBackground(boolean value);

    /**
     * Gets or sets image for zoom object.
     * Read/write {@link IPPImage}.
     */
    public IPPImage getImage();
    public void setImage(IPPImage value);

    /**
     * Gets or sets the duration of the transition between Zoom and slide.
     * Read/write {@code float}.
     * Default value: 1.0f
     */
    public float getTransitionDuration();
    public void setTransitionDuration(float value);
}

New methods in IShapeCollection interface have been added

These new methods create ZoomFrame objects:

/**
 * Adds a new Zoom object to the end of a collection.
 */
public IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide);

/**
 * Adds a new Zoom object to the end of a collection.
 */
public IZoomFrame addZoomFrame(float x, float y, float width, float height, ISlide slide, IPPImage image);

/**
 * Creates a new Zoom object and inserts it to a collection at the specified index.
 */
public IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide);

/**
 * Creates a new Zoom object and inserts it to a collection at the specified index.
 */
public IZoomFrame insertZoomFrame(int index, float x, float y, float width, float height, ISlide slide, IPPImage image);

Example:

This example shows you how to create a ZoomFrame object with a custom image and specified image frame:

Presentation pres = new Presentation();
try {
    //Add a new slide to the presentation
    ISlide slide = pres.getSlides().addEmptySlide(pres.getSlides().get_Item(0).getLayoutSlide());

    // Create a new image for zoom object
    byte[] imageBytes = Files.readAllBytes(Paths.get("image.png"));
    IPPImage image = pres.getImages().addImage(imageBytes);

    // Add ZoomFrame object
    IZoomFrame zoomFrame = pres.getSlides().get_Item(0).getShapes().addZoomFrame(20, 20, 300, 200, slide, image);

    // Set zoom frame format
    zoomFrame.getLineFormat().setWidth(5);
    zoomFrame.getLineFormat().getFillFormat().setFillType(FillType.Solid);
    zoomFrame.getLineFormat().getFillFormat().getSolidFillColor().setColor(Color.MAGENTA);
    zoomFrame.getLineFormat().setDashStyle(LineDashStyle.DashDot);

    // Save the presentation
    pres.save("presentation.pptx", SaveFormat.Pptx);
} catch (IOException e) {
} finally {
    if (pres != null) pres.dispose();
}

IHyperlinkManager.setMacroHyperlinkClick method has been added

A new method, setMacroHyperlinkClick, has been added to the IHyperlinkManager interface and HyperlinkManager class.

The setMacroHyperlinkClick method is used to set a macro hyperlink on a click for a shape.

Method declaration:

/**
 * Set Macro hyperlink on a click.
 */
public IHyperlink setMacroHyperlinkClick(String macroName);

This code snippet shows you how the setMacroHyperlinkClick method is used to set a macro hyperlink click on a shape:

Presentation pres = new Presentation();
try {
    IAutoShape shape = pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.BlankButton, 20, 20, 80, 30);
    shape.getHyperlinkManager().setMacroHyperlinkClick("MacroName");
} finally {
    if (pres != null) pres.dispose();
}

New methods setRootDirectoryClsid and getRootDirectoryClsid have been added to IPptOptions interface and PptOptions class

New methods, setRootDirectoryClsid and getRootDirectoryClsid, have been added to the IPptOptions interface and PptOptions class.

The setRootDirectoryClsid and getRootDirectoryClsid methods represents the object class GUID (CLSID) that is stored in the root directory entry.

Methods declaration:

/**
 * Represents the object class GUID (CLSID) that is stored in the root directory entry. Can be used for COM
 * activation of the document's application.
 * The default value is '64818D11-4F9B-11CF-86EA-00AA00B929E8' that corresponds to 'Microsoft Powerpoint.Slide.8'.
 */
public java.util.UUID getRootDirectoryClsid();
public void setRootDirectoryClsid(java.util.UUID value);

This code snippet shows you how the custom setRootDirectoryClsid can be set:

Presentation pres = new Presentation();
try {
    PptOptions pptOptions = new PptOptions();

    // set CLSID to 'Microsoft Powerpoint.Show.8'
    pptOptions.setRootDirectoryClsid(UUID.fromString("64818D10-4F9B-11CF-86EA-00AA00B929E8"));

    pres.save("pres.ppt", SaveFormat.Ppt, pptOptions);
} finally {
    if (pres != null) pres.dispose();
}