Browse our Products

Aspose.Slides for Java 20.10 Release Notes

New Features and Enhancements

KeySummaryCategory
SLIDESNET-41409Support for representing Autoshape text as curveFeature
SLIDESNET-42099Make IChartData.SetRange() method workable for all chart typesEnhancement
SLIDESNET-41960Add DefaultRegularFont property to NotesCommentsLayoutingOptionsFeature
SLIDESNET-35920WordArt effects editing APIFeature

Other Improvements and Changes

KeySummaryCategory
SLIDESJAVA-37955Use Aspose.Slides for Net 20.10 featuresEnhancement
SLIDESJAVA-37877Support to read WordArt Transformation propertiesFeature
SLIDESJAVA-38319The memory is not released by Aspsose.Slides on loading presentationInvestigation
SLIDESJAVA-38316Investigation regarding Shape IDs in presentationInvestigation
SLIDESJAVA-38315Presentation.GetThumbnail() generating the thumbnails for entire presentation rather selected slidesBug
SLIDESJAVA-38185Font size changing on rotating textBug
SLIDESJAVA-38184Direction of text getting changedBug
SLIDESJAVA-38183Сharacter spacing is not getting appliedBug
SLIDESJAVA-38182Exception on loading presentation fileBug
SLIDESJAVA-38178Can’t convert pptx file java.lang.OutOfMemoryError: GC overhead limit exceededBug
SLIDESJAVA-38170Pictures disappear after converting pptx file to thumbnailBug
SLIDESJAVA-38132Images are missing in generated PDFBug
SLIDESJAVA-38321Aspose.Slides 20.9: failed to use font directory with name “fonts”Bug
SLIDESJAVA-37700Equation text overlap in generated HTMLBug
SLIDESJAVA-36944Wrong formating in notesBug

Public API Changes

ITextFrameFormat.getThreeDFormat() and ITextFrameFormat.getTransform() methods have been added

New getThreeDFormat() and getTransform() methods have been added to ITextFrameFormat interface. These methods allow to set 3D effect to text in TextFrame.

Methods declaration:

/**
 * <p>
 * Returns the ThreeDFormat object that represents 3d effect properties for a text.
 * Read-only {@link IThreeDFormat}.
 * </p>
 */
public IThreeDFormat getThreeDFormat();

and

/**
 * <p>
 * Gets or sets text wrapping shape.
 * Read/write {@link TextShapeType}.
 * </p>
 */
public byte getTransform();

The code snippet below demonstrates setting 3D effect to text:

Presentation pres = new Presentation();
try {
    IAutoShape autoShape = pres.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 10, 20, 400, 300);

    ITextFrame textFrame = autoShape.getTextFrame();

    textFrame.setText("Aspose.Slide Test Text");

    // Set text transformation
    textFrame.getTextFrameFormat().setTransform(TextShapeType.ArchUpPour);

    // Set Extrusion
    textFrame.getTextFrameFormat().getThreeDFormat().getExtrusionColor().setColor(Color.ORANGE);
    textFrame.getTextFrameFormat().getThreeDFormat().setExtrusionHeight(6);

    // Set Contour
    textFrame.getTextFrameFormat().getThreeDFormat().getContourColor().setColor(Color.RED);
    textFrame.getTextFrameFormat().getThreeDFormat().setContourWidth(1.5);

    // Set Depth
    textFrame.getTextFrameFormat().getThreeDFormat().setDepth(3);

    // Set Material
    textFrame.getTextFrameFormat().getThreeDFormat().setMaterial(MaterialPresetType.Plastic);

    // Set Lighting
    textFrame.getTextFrameFormat().getThreeDFormat().getLightRig().setDirection(LightingDirection.Top);
    textFrame.getTextFrameFormat().getThreeDFormat().getLightRig().setLightType(LightRigPresetType.Balanced);
    textFrame.getTextFrameFormat().getThreeDFormat().getLightRig().setRotation(0, 0, 40);

    // Set camera type
    textFrame.getTextFrameFormat().getThreeDFormat().getCamera().setCameraType(CameraPresetType.PerspectiveContrastingRightFacing);
} finally {
    if (pres != null) pres.dispose();
}

IPresentation.getThumbnails, ISlide.getThumbnail and ISlide.renderToGraphics methods have been overloaded

New overloaded methods have been added to IPresentation and ISlide interfaces.

Overloaded methods in IPresentation:

/**
 * <p>
 * Returns a Thumbnail BufferedImage objects for all slides of a presentation.
 * </p>
 */
public java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options);

/**
 * <p>
 * Returns a Thumbnail BufferedImage objects for specified slides of a presentation.
 * </p>
 */
public java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, int[] slides);

/**
 * <p>
 * Returns a Thumbnail BufferedImage objects for all slides of a presentation with custom scaling.
 * </p>
 */
public java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, float scaleX, float scaleY);

/**
 * <p>
 * Returns a Thumbnail BufferedImage objects for specified slides of a presentation with custom scaling.
 * </p>
 */
public java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, int[] slides, float scaleX, float scaleY);

/**
 * <p>
 * Returns a Thumbnail BufferedImage objects for all slides of a presentation with specified size.
 * </p>
 */
public java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options,java.awt.Dimension imageSize);

/**
 * <p>
 * Returns a Thumbnail BufferedImage objects for specified slides of a presentation with specified size.
 * </p>
 */
public java.awt.image.BufferedImage[] getThumbnails(IRenderingOptions options, int[] slides,java.awt.Dimension imageSize);

Overloaded methods in ISlide:

/**
 * <p>
 * Returns a Thumbnail BufferedImage object.
 * </p>
 */
public java.awt.image.BufferedImage getThumbnail(IRenderingOptions options);

/**
 * <p>
 * Returns a Thumbnail BufferedImage object with custom scaling.
 * </p>
 */
public java.awt.image.BufferedImage getThumbnail(IRenderingOptions options, float scaleX, float scaleY);

/**
 * <p>
 * Returns a Thumbnail BufferedImage object with specified size.
 * </p>
 */
public java.awt.image.BufferedImage getThumbnail(IRenderingOptions options,java.awt.Dimension imageSize);

/**
 * <p>
 * Renders certain slide to a Graphics object.
 * </p>
 */
public void renderToGraphics(IRenderingOptions options,java.awt.Graphics2D graphics);

/**
 * <p>
 * Renders certain slide to a Graphics object with custom scaling.
 * </p>
 */
public void renderToGraphics(IRenderingOptions options,java.awt.Graphics2D graphics, float scaleX, float scaleY);

/**
 * <p>
 * Renders certain slide to a Graphics object using specified size.
 * </p>
 */
public void renderToGraphics(IRenderingOptions options,java.awt.Graphics2D graphics,java.awt.Dimension renderingSize);

All of these overloaded methods use IRenderingOptions as an argument and are used instead of old methods with INotesCommentsLayoutingOptions argument. Old methods are marked as obsolete and will be removed after Aspose.Slides 21.4 Release.

IRenderingOptions interface and RenderingOptions class have been added

IRenderingOptions interface and implementing it RenderingOptions class have been added. They aggregate options used during presentation or slide rendering.

IRenderingOptions declaration:

/**
 * <p>
 * Provides options that control how a presentation/slide is rendered.
 * </p>
 */
public interface IRenderingOptions extends ISaveOptions
{
    /**
     * <p>
     * Provides options that control how notes and comments is placed in exported document.
     * </p>
     */
    public INotesCommentsLayoutingOptions getNotesCommentsLayouting();
}

As it can be seen from the declaration, IRenderingOptions inherits ISaveOptions which makes getWarningCallback(), getProgressCallback() and getDefaultRegularFont() methods available to specify in RenderingOptions class instance together with getNotesCommentsLayouting() options.

The following code sample demonstrates one of the possible use cases - getting slide thumbnails with different default font and slide’s notes shown:

Presentation pres = new Presentation("SomePresentation.pptx");
try {
    IRenderingOptions renderingOpts = new RenderingOptions();
    renderingOpts.getNotesCommentsLayouting().setNotesPosition(NotesPositions.BottomTruncated);

    ImageIO.write(pres.getSlides().get_Item(0).getThumbnail(renderingOpts), "PNG", new File("SomePresentation-Slide1-Original.png"));

    renderingOpts.setDefaultRegularFont("Arial Black");
    ImageIO.write(pres.getSlides().get_Item(0).getThumbnail(renderingOpts), "PNG",  new File("SomePresentation-Slide1-ArialBlackDefault.png"));

    renderingOpts.setDefaultRegularFont("Arial Narrow");
    ImageIO.write(pres.getSlides().get_Item(0).getThumbnail(renderingOpts), "PNG",  new File("SomePresentation-Slide1-ArialNarrowDefault.png"));
} finally {
    if (pres != null) pres.dispose();
}

WordArt API support has been added

WordArt API allows to add effects to the text such as 3D effect, curved text, color gradients, etc.

WordArt support has been added to this version.