Browse our Products

Aspose.Slides for Java 26.8 Release Notes

KeySummaryCategoryRelated Documentation
SLIDESNET-43212Adding comment to table results in adding comment to slideEnhancementhttps://docs.aspose.com/slides/net/presentation-comments/
SLIDESNET-45459Implement export of chart objects to Markdown formatFeature
SLIDESNET-45461Implement export of SmartArt objects to Markdown formatFeature
SLIDESNET-45463Add support for rendering an image of an individual paragraphFeature
SLIDESJAVA-39597Use Aspose.Slides for Net 26.8 featuresEnhancement
SLIDESJAVA-39840Converted emojis appear monochromaticBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-pdf/
SLIDESJAVA-39841Emoji are rendered incorrectly or disappear when converting PPTX slides to images on Alpine LinuxBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-pdf/
SLIDESJAVA-39845Incorrect chart rendering after saveBughttps://docs.aspose.com/slides/java/save-presentation/
SLIDESJAVA-39221Background color in EMF image is changed when saving a presentation to PDFBughttps://docs.aspose.com/slides/java/convert-powerpoint-to-pdf/

⚠ IMPORTANT DEPRECATION NOTICE

Starting with version 26.10, support for JDK 1.6 and JDK 1.7 will be completely discontinued.

What is changing:

  • The minimum supported Java version will be JDK 1.8 (Java 8) or higher.
  • JDK 1.6 and JDK 1.7 will no longer be compatible with the product.

Recommended actions:

Please plan to migrate your environments and deployment scripts to JDK 1.8 or higher to avoid failures when upgrading to version 26.10.

The current version (up to 26.9 inclusive) continues to work with JDK 1.6 and 1.7, but we strongly recommend starting the migration process now.

Public API Changes

Support for rendering an image of an individual paragraph

The new GetImage methods have been added to the IParagraph interface and Paragraph class. These methods allow you to render a paragraph as an image.

/**
 * <p>
 * Returns an image of the paragraph.
 * </p>
 * @return
 *  An image containing the rendered paragraph, or null
 *  if the paragraph cannot be found in its parent collection, has no valid
 *  rendering bounds, or an error occurs while rendering the image.
 */
public IImage getImage();

/**
 * <p>
 * Returns an image of the paragraph with the specified scale.
 * </p>
 * @return
 *  An image containing the rendered paragraph, or null
 *  if the paragraph cannot be found in its parent collection, has no valid
 *  rendering bounds, or an error occurs while rendering the image.
 * @param scaleX
 *  The horizontal scale factor applied to the paragraph image.
 * @param scaleY
 *  The vertical scale factor applied to the paragraph image.
 */
public IImage getImage(float scaleX, float scaleY);

Usage examples

The following example shows how to render each paragraph in all AutoShapes on a slide as an image with custom scaling:

Presentation pres = new Presentation("sample.pptx");
try {
    ISlide slide = pres.getSlides().get_Item(0);

    int shapeIndex = 0;
    for (int i = 0; i < slide.getShapes().size(); i++)
    {
        IShape shape = slide.getShapes().get_Item(i);
        shapeIndex++;

        if (shape instanceof IAutoShape) {
            IAutoShape autoShape = (IAutoShape) shape;
            if (autoShape.getTextFrame() == null)
                continue;

            int paragraphIndex = 0;
            for (int j = 0; j < autoShape.getTextFrame().getParagraphs().getCount(); j++) {
                IParagraph paragraph = autoShape.getTextFrame().getParagraphs().get_Item(j);
                paragraphIndex++;

                IImage paragraphImage = paragraph.getImage(2f, 2f);
                if (paragraphImage != null) {
                    paragraphImage.save("shape" + shapeIndex + "_paragraph" + paragraphIndex + ".png");
					paragraphImage.dispose();
                }
            }
        }
    }
} finally {
    if (pres != null) pres.dispose();
}

The following example shows how to render each paragraph in a table:

Presentation pres = new Presentation("table.pptx");
try {
    ISlide slide = pres.getSlides().get_Item(0);
    Table table = (Table)slide.getShapes().get_Item(0);

    int paragraphIndex = 0;
    for (int iRow = 0; iRow < table.getRows().size(); iRow++)
    {
        for (int iCol = 0; iCol < table.getColumns().size(); iCol++)
        {
            Cell cell = (Cell)table.get_Item(iCol, iRow);
            if (cell.getTextFrame() == null)
                continue;

            for (int i = 0; i < cell.getTextFrame().getParagraphs().getCount(); i++)
            {
                IParagraph para = cell.getTextFrame().getParagraphs().get_Item(i);
                paragraphIndex++;

                IImage paragraphImage = para.getImage();
                if (paragraphImage != null) {
                    paragraphImage.save("paragraph" + paragraphIndex + ".png");
                    paragraphImage.dispose();
                }
            }
        }
    }
} finally {
    if (pres != null) pres.dispose();
}