Browse our Products

Aspose.Slides for Java 17.8 Release Notes

KeySummaryCategory
SLIDESJAVA-36195Embedding a PDF or mp3 as an icon in presentationInvestigation
SLIDESNET-19163Add support for PP2010 PPTX presentations with embedded videoFeature
SLIDESNET-38901Support for switching Rows and Columns of chart dataFeature
SLIDESNET-39101Support for setting offset values of stretched pictureFeature
SLIDESNET-39124Adding the picture border featureFeature
SLIDESNET-39088Difference between organization of text extracted from PPT and PPTXFeature
SLIDESJAVA-35568Support embedding fonts in the PowerPoint documentsFeature
SLIDESJAVA-36419Support for getting loaded fonts list from LoadExternalFonts()Feature
SLIDESJAVA-29460Add support for PP2010 PPTX presentations with embedded videoFeature
SLIDESJAVA-35082Exception on extracting internal slide hyperlinkBug
SLIDESJAVA-36376Gradient and Texture effects are missing in exported HTMLBug
SLIDESJAVA-36379Package “com.aspose.slides.Collections” is not exported in the MANIFEST.MFBug
SLIDESJAVA-36386Shape outlines on tables/charts are not rendered in PDF/PNGBug
SLIDESJAVA-36398Text in exported SVG is misplacedBug
SLIDESJAVA-36400Autofit Property is not working properlyBug
SLIDESJAVA-36429Table rendered as blurred in exported PDFBug
SLIDESJAVA-36440Difference in Language ID for PPT and PPTX filesBug
SLIDESJAVA-36444Information is removed from NotesMaster XML on saving presentationBug
SLIDESJAVA-36486Chart plot area missing in exported PDFBug
SLIDESJAVA-36487Exception on loading presentationBug
SLIDESJAVA-36508OLE object property not working properlyBug
SLIDESJAVA-36545Exception on saving presentationBug
SLIDESJAVA-36569PPTX not properly rendered to SVGBug
SLIDESJAVA-17730Missing shapes and misaligned chart in exported PDFBug

Public API Changes

getNotesStyle method has been added to IMasterNotesSlide interface and MasterNotesSlide class

getNotesStyle() method has been added to IMasterNotesSlide interface and MasterNotesSlide class respectively. Return value specifies the style of a notes text.

Presentation presentation = new Presentation("Presentation.pptx");
try{
    IMasterNotesSlide notesMaster = presentation.getMasterNotesSlideManager().getMasterNotesSlide();

    if (notesMaster != null) {
        // Get MasterNotesSlide text style
        ITextStyle notesStyle = notesMaster.getNotesStyle();

        //Set symbol bullet for the first level paragraphs
        IParagraphFormat paragraphFormat = notesStyle.getLevel(0);
        paragraphFormat.getBullet().setType(BulletType.Symbol);
    }

    presentation.save("Presentation-out.pptx", SaveFormat.Pptx);
}finally {
    presentation.dispose();
}

Method com.aspose.slides.IChartData.switchRowColumn() has been added

Swap the data over the axis. Data being charted on the X axis will move to the Y axis and vice versa.

Presentation pres = new Presentation();
try {
    IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.ClusteredColumn, 100, 100, 400, 300);

    chart.getChartData().switchRowColumn();
    pres.save(outputFileName, SaveFormat.Pptx);
}finally {
    pres.dispose();
}

Method FontsLoader.getFontFolders() has been added

Returns folders where font files are searched. Those are folders that have been added with loadExternalFonts() method as well as system font folders.

String[] fontFolders = FontsLoader.getFontFolders();

New EmbedFontCharacters enum and addEmbeddedFont() methods have been added

To allow embedding fonts into Presentation the new EmbedFontCharacters enum and two overloaded methods addEmbeddedFont() have been added:

EmbedFontCharacters enum has two members:

  • OnlyUsed: Embed only the characters used in the presentation (best for reducing file size).
  • All: Embed all characters (best for editing by other people).

New methods addEmbeddedFont() have been added to IFontsManager interface and FontsManager implementation class:

To embed font from existing IFontData:

void addEmbeddedFont(IFontData fontData, EmbedFontCharacters embedFontRule)

To embed font from a binary data:

void addEmbeddedFont(byte[] fontData, EmbedFontCharacters embedFontRule)

Using these methods and choosing the desired embedding rule (represented by EmbedFontCharacters enum), all fonts used in Presentation can be embedded:

IFontData[] allFonts = pres.getFontsManager().getFonts();
IFontData[] embeddedFonts = pres.getFontsManager().getEmbeddedFonts();
for (IFontData font : except(allFonts, embeddedFonts))
{
    pres.getFontsManager().addEmbeddedFont(font, EmbedFontCharacters.All);
}

Please note that an ArgumentException will be thrown if embedded font which is already embedded will be added again using addEmbeddedFont() method.

Methods to get-set edges of fill rectangle have been added to com.aspose.slides.IPictureFillFormat interface and PictureFillFormat class

getStretchOffsetLeft, setStretchOffsetLeft, getStretchOffsetTop, setStretchOffsetTop, getStretchOffsetRight, setStretchOffsetRight, getStretchOffsetBottom, setStretchOffsetBottom methods have been added to IPictureFillFormat interface and PictureFillFormat class respectively.

These methods get/set edges of the fill rectangle. When stretching of an image is specified, a source rectangle is scaled to fit the specified fill rectangle.

Each edge of the fill rectangle is defined by a percentage offset from the corresponding edge of the shape’s bounding box. A positive percentage specifies an inset, while a negative percentage specifies an outset.

For example, a left offset of 25% specifies that the left edge of the fill rectangle is located to the right of the bounding box’s left edge by an amount equal to 25% of the bounding box’s width.

Code example:

Presentation presentation = new Presentation();
try {
    // Get the first slide of presentation
    ISlide slide = presentation.getSlides().get_Item(0);

    // Add an AutoShape of Rectangle type
    IAutoShape aShape = slide.getShapes().addAutoShape(ShapeType.Rectangle, 100, 100, 300, 300);

    // Create image
    BufferedImage img = ImageIO.read(new File("image.png"));
    IPPImage imgEx = presentation.getImages().addImage(img);

    // Set shape's fill type
    aShape.getFillFormat().setFillType(FillType.Picture);

    // Set shape's picture fill mode
    aShape.getFillFormat().getPictureFillFormat().setPictureFillMode(PictureFillMode.Stretch);

    // Set image to fill the shape
    aShape.getFillFormat().getPictureFillFormat().getPicture().setImage(imgEx);

    // Specify image offsets from the corresponding edge of the shape's bounding box
    aShape.getFillFormat().getPictureFillFormat().setStretchOffsetLeft(25f);
    aShape.getFillFormat().getPictureFillFormat().setStretchOffsetRight(25f);
    aShape.getFillFormat().getPictureFillFormat().setStretchOffsetTop(-20f);
    aShape.getFillFormat().getPictureFillFormat().setStretchOffsetBottom(-10f);

    // Save created presentation
    presentation.save("StretchOffsetExample.pptx", SaveFormat.Pptx);
} finally {
    presentation.dispose();
}