Aspose.Slides for Java 16.8.0 Release Notes

KeySummaryCategory
SLIDESJAVA-35613Support for colorizing added images in Aspsoe.SlidesFeature
SLIDESJAVA-35002Getting position of Text inside slide shape TextFrameFeature
SLIDESJAVA-34979Possibility to obtain effective TextFrame Margin valuesFeature
SLIDESJAVA-34419Support for fixed HTML export in Aspose.SlidesFeature
SLIDESNET-37787Implementation of ClassIdentifier PropertyFeature
SLIDESNET-37760Support removing embedded fonts in the PowerPointFeature
SLIDESNET-37738Implementation of OpenDocument presentation templateFeature
SLIDESNET-37737Export to Responsive HTML formatFeature
SLIDESNET-37537Support for removing embedded fonts from presentationFeature
SLIDESNET-36731Possibility to obtain effective TextFrameFormat valueFeature
SLIDESNET-36720Support for fixed HTML export in Aspose.SlidesFeature
SLIDESJAVA-35618Wrong text positionBug
SLIDESJAVA-35617Character misplaced after converting to svgBug
SLIDESJAVA-35616Image is not rendered correctly in exported PDFBug
SLIDESJAVA-35615Wrong bullet number rendered for exported PDFBug
SLIDESJAVA-35612Text color changes after converting pptx to pdfBug
SLIDESJAVA-35607Exception on adding connectorBug
SLIDESJAVA-35606Losing sound on cloningBug
SLIDESJAVA-35590Image missing while converting ppt to svgBug
SLIDESJAVA-35583Missing Text and error after converting to svgBug
SLIDESJAVA-35582Underline Color Improperly readBug
SLIDESJAVA-35577Bullets are not appeared correctly after converting to svgBug
SLIDESJAVA-35576Exception on saving pptxBug
SLIDESJAVA-35566Presentation not savingBug
SLIDESJAVA-35562Exception on loading pptBug
SLIDESJAVA-35553Slide to svg conversion:slides colors are changed after saving pptBug
SLIDESJAVA-35528Invalid jpeg marker error when converting to HTMLBug
SLIDESJAVA-35527Borders around equations and charts appearing on saving presentationBug
SLIDESJAVA-35519Value cannot be null on saving PPT presentationBug
SLIDESJAVA-35458Image relationship getting changed in saved presentationBug
SLIDESJAVA-35429Xml changed on load and saveBug
SLIDESJAVA-35386Element already exists exception on loading presentationBug
SLIDESJAVA-35361Ppt to pdf slow conversionBug
SLIDESJAVA-35329Extract text from Handout Master page using Aspose.Slides failsBug
SLIDESJAVA-35328Extract text from Notes Master page using Slides failsBug
SLIDESJAVA-35292PDF notes are not rendering for for ppt fileBug
SLIDESJAVA-35269Data sheet cannot be edited after slide cloningBug
SLIDESJAVA-34804Presentation loading time is too much.Bug
SLIDESJAVA-34783Significant performance and memory overhead after upgrade from earlier version 8.6.0Bug
SLIDESJAVA-33726Several bugs in Aspose.Slides 6.9.1Bug

Public API Changes

createTextFrameFormatEffective() method has been added to TextFrame class and ITextFrame interface

It returns effective value of text frame format for the TextFrame object. Returned type is ITextFrameFormatEffectiveData.

Interface com.aspose.slides.ITextFrameFormatEffectiveData has been added

Represents effective values (formatting values with inheritance applied) of text frame format. It contains the following methods:

  • ITextStyleEffectiveData getTextStyle() — Returns effective text’s style.
  • double getMarginLeft() — Returns the left margin (points) in a TextFrame.
  • double getMarginRight() — Returns the right margin (points) in a TextFrame.
  • double getMarginTop() — Returns the top margin (points) in a TextFrame.
  • double getMarginBottom() — Returns the bottom margin (points) in a TextFrame.
  • boolean getWrapText() — Returns if text is wrapped at TextFrame’s margins.
  • byte getAnchoringType() — Returns vertical anchor text in a TextFrame.
  • boolean getCenterText() — Returns if text should be centered in box horizontally.
  • byte getTextVerticalType() — Returns text orientation.
  • byte getAutofitType() — Returns text autofit mode.

Code example:

Presentation pres = new Presentation("pres.pptx");
try{
    ISlide slide = pres.getSlides().get_Item(0);
    IShape shape = slide.getShapes().get_Item(0);
    ITextFrame textFrame = ((AutoShape)shape).getTextFrame();
    ITextFrameFormatEffectiveData textFrameFormatEffective = textFrame.createTextFrameFormatEffective();
    System.out.println("margin top: " + textFrameFormatEffective.getMarginTop());
    System.out.println("margin left: " + textFrameFormatEffective.getMarginLeft());
    System.out.println("margin right: " + textFrameFormatEffective.getMarginRight());
    System.out.println("margin bottom: " + textFrameFormatEffective.getMarginBottom());
} finally {
    if(pres != null) pres.dispose();
}

Interface com.aspose.slides.ITextStyleEffectiveData has been added

Represents effective values (formatting values with inheritance applied) of text style. It contains the following methods:

  • IParagraphFormatEffectiveData getLevel(int index) — Returns level of effective style.
  • IParagraphFormatEffectiveData getDefaultParagraphFormat() — Returns effective default paragraph properties.

Code example:

Presentation pres = new Presentation("pres.pptx");
try{
    ISlide slide = pres.getSlides().get_Item(0);
    IShape shape = slide.getShapes().get_Item(0);
    ITextFrame textFrame = ((AutoShape)shape).getTextFrame();
    ITextFrameFormatEffectiveData textFrameFormatEffective = textFrame.createTextFrameFormatEffective();

    ITextStyleEffectiveData textStyleEffective = textFrameFormatEffective.getTextStyle();

} finally {
    if(pres != null) pres.dispose();
}

New classes were added, intended to provide the functionality to embed EOT and WOFF fonts into generated HTML document

The two new classes were added to provide the functionality to embed WOFF and EOT fonts into generated HTML document:

  • EmbeddedWoffFontsHtmlController
  • EmbeddedEotFontsHtmlController

Below is an example of how to use the new EmbeddedWoffFontsHtmlController class to export HTML with embedded WOFF fonts:

Presentation pres = new Presentation("pres.pptx");
try
{
    EmbeddedWoffFontsHtmlController controller = new EmbeddedWoffFontsHtmlController();
    HtmlOptions htmlOptions = new HtmlOptions();
    htmlOptions.setHtmlFormatter(HtmlFormatter.createCustomFormatter(controller));

    pres.save("pres.html", SaveFormat.Html, htmlOptions);
} finally {
    if(pres != null) pres.dispose();
}

New interface IResponsiveHtmlController and class ResponsiveHtmlController have been added

The new class was added intended to provide the responsive HTML to the generated HTML files: ResponsiveHtmlController.

This controller can be used in the same manner as other HTML controllers:

Presentation pres = new Presentation("pres.pptx");
try
{
    ResponsiveHtmlController controller = new ResponsiveHtmlController();
    HtmlOptions htmlOptions = new HtmlOptions();
    htmlOptions.setHtmlFormatter(HtmlFormatter.createCustomFormatter(controller));

    pres.save("pres.html", SaveFormat.Html, htmlOptions);
} finally {
    if(pres != null) pres.dispose();
}

New methods have been added to com.aspose.slides.FontsManager

The following new methods have been added to IFontsManager interface and FontsManager class:

IFontData[] getEmbeddedFonts() - this method returns the fonts embedded in the presentation.
void removeEmbeddedFont(IFontData fontData) - this method removes the embedded font from the presentation.

There is the sample demonstrates the use case for these new methods:

// load the presentation with embedded "FunSized" font in it
Presentation pres = new Presentation("pres.ppt");
try
{
    // render the presentation containing the text frame with the text using embedded "FunSized" font
    ImageIO.write(pres.getSlides().get_Item(0).getThumbnail(new Dimension(960, 720)), "PNG", new File("pres-1.png"));

    IFontsManager fontsManager = pres.getFontsManager();

    // get all embedded fonts
    IFontData[] embeddedFonts = fontsManager.getEmbeddedFonts();

    // find "FunSized" font
    IFontData funSizedEmbeddedFont = null;
    for(int i = 0; i < embeddedFonts.length; i++)
        if("FunSized".equals(embeddedFonts[i].getFontName())){
            funSizedEmbeddedFont = embeddedFonts[i];
            break;
        }

    // remove "FunSized" font
    fontsManager.removeEmbeddedFont(funSizedEmbeddedFont);

    // render the presentation after removing the "FunSized" font resulting in a font replacement from "FunSized" to an existing one
    ImageIO.write(pres.getSlides().get_Item(0).getThumbnail(new Dimension(960, 720)), "PNG", new File("pres-2.png"));

    // save the presentation without embedded "FunSized" font
    pres.save("37537-2.ppt", SaveFormat.Ppt);
} finally {
    if(pres != null) pres.dispose();
}