Browse our Products

Aspose.Slides for Java 24.8 Release Notes

KeySummaryCategoryRelated Documentation
SLIDESNET-44607Identify restricted fonts in PPTX filesEnhancement
SLIDESNET-44595Add property to obtain binary content of the font from FontDataFeature
SLIDESNET-44485Support “Picture or texture fill” settingsFeaturehttps://docs.aspose.com/slides/net/picture-frame/
SLIDESNET-44050The file exported by the writeAsMathMl method is missing color and font sizeEnhancementhttps://docs.aspose.com/slides/net/exporting-math-equations/
SLIDESNET-44277Summary Zoom does not work in exported PDF documentsFeaturehttps://docs.aspose.com/slides/net/convert-powerpoint-ppt-and-pptx-to-pdf/
SLIDESNET-43219Displaying comments in generated HTML5 documentFeaturehttps://docs.aspose.com/slides/net/export-to-html5/
SLIDESJAVA-39042Use Aspose.Slides for Net 24.8 featuresEnhancement
SLIDESJAVA-39184Slide contents do not match after replacing text portionsBughttps://docs.aspose.com/slides/java/manage-smartart/
SLIDESJAVA-39506OutOfMemoryError occurs when converting PPTX to PDFBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-pdf/
SLIDESJAVA-39467Incorrect background gradient fill when converting slides to imagesBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-jpg/
SLIDESJAVA-39500Chart is displayed incorrectly after restoring PPTX from ByteArrayOutputStreamBughttps://docs.aspose.com/slides/java/save-presentation/
SLIDESJAVA-39486Hidden chart data becomes visible after rewriting the workbookBughttps://docs.aspose.com/slides/java/chart-workbook/
SLIDESJAVA-39326wk: the chart in PowerPoint and chart converted to PNG image do not match - the curve is longer in PNGBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-jpg/
SLIDESJAVA-39495NullPointerException occurs when loading PPT in Aspose.SlidesBughttps://docs.aspose.com/slides/java/open-presentation/
SLIDESJAVA-39222The file exported by the writeAsMathMl method is missing color and font sizeEnhancementhttps://docs.aspose.com/slides/java/exporting-math-equations/
SLIDESJAVA-39484Black strip appears when converting slides to HTMLBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-html/
SLIDESJAVA-39485Charts are truncated after cloning presentation slidesBughttps://docs.aspose.com/slides/java/clone-slides/
SLIDESJAVA-39476Chart series markers are larger when converting PPTX to PDFBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-pdf/
SLIDESJAVA-39477Axis value labels are displayed incorrectly when converting PPTX to PDFBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-pdf/

Public API Changes

Support for the Tile properties of the PictureFillFormat

The following properties have been added to the IPictureFillFormat interface and PictureFillFormat class:

  • TileOffsetX property returns or sets the horizontal offset of the texture from the shape’s origin in points.
  • TileOffsetY property returns or sets the vertical offset of the texture from the shape’s origin in points.
  • TileScaleX property returns or sets the horizontal scale for the texture fill as a percentage.
  • TileScaleY property returns or sets the vertical scale for the texture fill as a percentage.
  • TileAlignment property returns or sets how the texture is aligned within the shape.
  • TileFlip property flips the texture tile around its horizontal, vertical or both axis.

The following code sample shows how to add the new Rectangle shape with a tiled picture fill and change the Tile properties:

Presentation pres = new Presentation();
try {
    ISlide firstSlide = pres.getSlides().get_Item(0);

    IPPImage ppImage;
    IImage newImage = Images.fromFile("image.png");
    ppImage = pres.getImages().addImage(newImage);
    newImage.dispose();

    // Adds the new Rectangle shape
    IAutoShape newShape = firstSlide.getShapes().addAutoShape(ShapeType.Rectangle, 0, 0, 350, 350);

    // Sets the fill type of the new shape to Picture
    newShape.getFillFormat().setFillType(FillType.Picture);

    // Sets the shape's fill image
    IPictureFillFormat pictureFillFormat = newShape.getFillFormat().getPictureFillFormat();
    pictureFillFormat.getPicture().setImage(ppImage);

    // Sets the picture fill mode to Tile and changes the properties
    pictureFillFormat.setPictureFillMode(PictureFillMode.Tile);
    pictureFillFormat.setTileOffsetX(-275);
    pictureFillFormat.setTileOffsetY(-247);
    pictureFillFormat.setTileScaleX(25);
    pictureFillFormat.setTileScaleY(15);
    pictureFillFormat.setTileAlignment(RectangleAlignment.BottomRight);
    pictureFillFormat.setTileFlip(TileFlip.FlipBoth);

    pres.save("Tile.pptx", SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}

The next code sample demonstrates how to set the background fill type to the tiled picture fill and change the Tile properties:

Presentation pres = new Presentation();
try {
    ISlide firstSlide = pres.getSlides().get_Item(0);

    IPPImage ppImage;
    IImage newImage = Images.fromFile("image.png");
    ppImage = pres.getImages().addImage(newImage);
    newImage.dispose();

    // Gets the background of the first slide
    IBackground background = firstSlide.getBackground();

    // Sets the type of the background to OwnBackground.
    background.setType(BackgroundType.OwnBackground);

    // Sets the fill type of the background to Picture
    background.getFillFormat().setFillType(FillType.Picture);

    // Sets the background fill image
    IPictureFillFormat backPictureFillFormat = background.getFillFormat().getPictureFillFormat();
    backPictureFillFormat.getPicture().setImage(ppImage);

    // Sets the picture fill mode to Tile and changes the properties
    backPictureFillFormat.setPictureFillMode(PictureFillMode.Tile);
    backPictureFillFormat.setTileOffsetX(15f);
    backPictureFillFormat.setTileOffsetY(15f);
    backPictureFillFormat.setTileScaleX(46f);
    backPictureFillFormat.setTileScaleY(87f);
    backPictureFillFormat.setTileAlignment(RectangleAlignment.Center);
    backPictureFillFormat.setTileFlip(TileFlip.FlipY);

    pres.save("BackgroundTile.pptx", SaveFormat.Pptx);
} finally {
    if (pres != null) pres.dispose();
}

IFontsManager.GetFontBytes and IFontsManager.GetFontEmbeddingLevel methods have been added

A method GetFontBytes has been added to the IFontsManager interface, FontsManager and FontStyle classes. This method allows retrieving byte data of fonts from a presentation.

The following example shows how to retrieve binary font data from a presentation:

Presentation pres = new Presentation ("Presentation.pptx");
try {
    // Retrieve all fonts used in the presentation
    IFontData[] fonts = pres.getFontsManager().getFonts();

    // Get the byte array representing the regular style of the first font in the presentation
    byte[] fontBytes = pres.getFontsManager().getFontBytes(fonts[0], FontStyle.Regular);
} finally {
    if (pres != null) pres.dispose();
}

A method GetFontEmbeddingLevel has been added to the IFontsManager interface, FontsManager and FontStyle classes. This method allows you to get the embedding level of the font.

The following example shows how to get the embedding level for a font:

Presentation pres = new Presentation("Presentation.pptx");
try {
    // Retrieve all fonts used in the presentation
    IFontData[] fontDatas = pres.getFontsManager().getFonts();

    // Get the byte array representing the regular style of the first font in the presentation
    byte[] bytes = pres.getFontsManager().getFontBytes(fontDatas[0], FontStyle.Regular);

    // Determine the embedding level of the font
    int embeddingLevel = pres.getFontsManager().getFontEmbeddingLevel(bytes, fontDatas[0].getFontName());
} finally {
    if (pres != null) pres.dispose();
}

The font embedding level can take the following values:

class EmbeddingLevel
{
    /**
     * <p>
     * Fonts with this setting indicate that they may be embedded and permanently installed on the remote system by an application. 
     * The user of the remote system acquires the identical rights, obligations and licenses for that font as the original purchaser of the font, 
     * and is subject to the same end-user license agreement, copyright, design patent, and/or trademark as was the original purchaser.
     * </p>
     */
    Installable = 0x0000;

    /**
     * <p>
     * Fonts that have only this bit set must not be modified, embedded or exchanged in any manner without first obtaining permission of the legal owner. 
     * </p>
     */
    Restricted = 0x0002;

    /**
     * <p>
     * When this bit is set, the font may be embedded, and temporarily loaded on the remote system. Documents containing Preview &amp; 
     * Print fonts must be opened "read-only;" no edits can be applied to the document.
     * </p>
     */
    PreviewPrint = 0x0004;

    /**
     * <p>
     * When this bit is set, the font may be embedded but must only be installed temporarily on other systems. In contrast to Preview &amp; 
     * Print fonts, documents containing Editable fonts may be opened for reading, editing is permitted, and changes may be saved.
     * </p>
     */
    Editable = 0x0008;

    /**
     * <p>
     * When this bit is set, the font may not be subsetted prior to embedding. Other embedding restrictions specified in bits 0-3 and 9 also apply.
     * </p>
     */
    NoSubsetting = 0x0100;

    /**
     * <p>
     * When this bit is set, only bitmaps contained in the font may be embedded. No outline data may be embedded. If there are no bitmaps available in the font, 
     * then the font is considered unembeddable and the embedding services will fail.
     * </p>
     */
    BitmapOnly = 0x0200;
}

The font style can take the following values:

class FontStyle
{

    /**
     * <p>
     * Regular font style
     * </p>
     */
    int Regular = 0;
    /**
     * <p>
     * Bold font style
     * </p>
     */
    int Bold = 1;
    /**
     * <p>
     * Italic font style
     * </p>
     */
    int Italic = 2;

    /**
     * <p>
     * Underline font style
     * </p>
     */
    int Underline = 4;

    /**
     * <p>
     * Strikeout font style
     * </p>
     */
    int Strikeout = 8;
}