Browse our Products

Aspose.Slides for Java 17.1.0 Release Notes

KeySummaryCategory
SLIDESNET-38199Support for Value from Cells feature for chart data labelsFeature
SLIDESNET-36738Support for bulk setting text properties for whole table, row or columnFeature
SLIDESNET-35709Set and control text spellcheck language using Aspose.SlidesFeature
SLIDESNET-34103Add support for changing language of presentation and shape’s textFeature
SLIDESNET-33368Using locale for setting the languageFeature
SLIDESNET-3104Language property for textboxesFeature
SLIDESNET-36086Changing slides orientation has no effect on contentsFeature
SLIDESJAVA-33807Support for setting the default font height for tableFeature
SLIDESJAVA-33278Setting language on the portions, paragraphsFeature
SLIDESJAVA-26535Change Presentation LanguageFeature
SLIDESJAVA-35854Exception on saving presentationBug
SLIDESJAVA-35863When PPTX is converted to PDF, result file returns an error in Acrobat ReaderBug
SLIDESJAVA-35862EMF failed to render in PDF for java headless modeBug
SLIDESJAVA-35826Unexpected subscript effect on saving presentationBug
SLIDESJAVA-35824Exception thrown on adding chartBug
SLIDESJAVA-35821Text are improperly rendered in generated PDFBug
SLIDESJAVA-35819EMF images are not properly rendered in generated pdfBug
SLIDESJAVA-35807Pptx not properly converted to pdfBug
SLIDESJAVA-35801Exception on generating thumbnailsBug
SLIDESJAVA-35787Text in pptx document not justified properlyBug
SLIDESJAVA-35737Issue while converting pptx to pngBug
SLIDESJAVA-35736Slide orientation went wrongBug
SLIDESJAVA-35722Exception on saving presentationBug
SLIDESJAVA-35673Icon missing after converting slide to svgBug
SLIDESJAVA-35617Character misplaced after converting to svgBug
SLIDESJAVA-35565Images and text get cropped while converting from pptx to pdfBug
SLIDESJAVA-35051Incorrect chart on generated pdfBug
SLIDESJAVA-34670Changing presentation orientation and exporting to PDF crops the slidesBug
SLIDESJAVA-34381Images are not rendered in HTML to PDF ImportBug
SLIDESJAVA-34096Chart missing in generated PDFBug

Public API Changes

com.aspose.slides.IBulkTextFormattable interface has been added

com.aspose.slides.IBulkTextFormattable interface has been added. It represents an object with possibility of bulk setting child text elements’ formats. It contains the following methods:

void setTextFormat(IPortionFormat source);
void setTextFormat(IParagraphFormat source);
void setTextFormat(ITextFrameFormat source);

Calling any of them will make an object of class that implements this interface set all its child portions / paragraphs / text frames (accordingly to used method overload) with all defined properties from provided format sample.

Default public constructors have been added to com.aspose.slides.PortionFormat, ParagraphFormat and TextFrameFormat classes

Default public constructors have been added to PortionFormat, ParagraphFormat and TextFrameFormat classes. Formats created with these constructions using can be used to specify text formats for a whole table, etc.

Usage Example:

PortionFormat portionFormat = new PortionFormat();
ParagraphFormat paragraphFormat = new ParagraphFormat();
TextFrameFormat textFrameFormat = new TextFrameFormat();

Methods getShowLabelValueFromCell() and setShowLabelValueFromCell() have been added to com.aspose.slides.IDataLabelFormat interface and DataLabelFormat class

Methods com.aspose.slides.DataLabelFormat.getShowLabelValueFromCell(), setShowLabelValueFromCell() determine if data label text contains data from workbook data cell.

String lbl0 = "Label 0 cell value";
String lbl1 = "Label 1 cell value";
String lbl2 = "Label 2 cell value";

Presentation pres = new Presentation();
try {

    IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Bubble, 50, 50, 600, 400, true);

    IChartSeriesCollection series = chart.getChartData().getSeries();

    series.get_Item(0).getLabels().getDefaultDataLabelFormat().setShowLabelValueFromCell(true);

    IChartDataWorkbook wb = chart.getChartData().getChartDataWorkbook();

    series.get_Item(0).getLabels().get_Item(0).setValueFromCell(wb.getCell(0, "A10", lbl0));
    series.get_Item(0).getLabels().get_Item(1).setValueFromCell(wb.getCell(0, "A11", lbl1));
    series.get_Item(0).getLabels().get_Item(2).setValueFromCell(wb.getCell(0, "A12", lbl2));
} finally {
    pres.dispose();
}

Methods getValueFromCell and setValueFromCell() have been added to com.aspose.slides.IDataLabel interface and DataLabel class

Gets or sets workbook data cell. Applied if com.aspose.slides.IDataLabelFormat.getShowLabelValueFromCell() method returns true.

String lbl0 = "Label 0 cell value";
String lbl1 = "Label 1 cell value";
String lbl2 = "Label 2 cell value";

Presentation pres = new Presentation();
try {

    IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Bubble, 50, 50, 600, 400, true);

    IChartSeriesCollection series = chart.getChartData().getSeries();

    series.get_Item(0).getLabels().getDefaultDataLabelFormat().setShowLabelValueFromCell(true);

    IChartDataWorkbook wb = chart.getChartData().getChartDataWorkbook();

    series.get_Item(0).getLabels().get_Item(0).setValueFromCell(wb.getCell(0, "A10", lbl0));
    series.get_Item(0).getLabels().get_Item(1).setValueFromCell(wb.getCell(0, "A11", lbl1));
    series.get_Item(0).getLabels().get_Item(2).setValueFromCell(wb.getCell(0, "A12", lbl2));

    pres.save("presentation.pptx", SaveFormat.Pptx);
} finally {
    pres.dispose();
}

setTextFormat() methods have been added to com.aspose.slides.Column class due to inheritance from IBulkTextFormattable added to IColumn interface

com.aspose.slides.Column class now implements IBulkTextFormattable interface as a part of IColumn interface. Portion, paragraph or text frame format properties can be set to all column cells by calling Column.setTextFormat() methods.

Usage Examples:

ITable someTable = (ITable)presentation.getSlides().get_Item(0).getShapes().get_Item(0); // let's say that the first shape on the first slide is a table

// setting first column cells' font height
PortionFormat portionFormat = new PortionFormat();
portionFormat.setFontHeight(25);
someTable.getColumns().get_Item(0).setTextFormat(portionFormat);

// setting first column cells' text alignment and right margin in one call
ParagraphFormat paragraphFormat = new ParagraphFormat();
paragraphFormat.setAlignment(TextAlignment.Right);
paragraphFormat.setMarginRight(20);
someTable.getColumns().get_Item(0).setTextFormat(paragraphFormat);

// setting second column cells' text vertical type
TextFrameFormat textFrameFormat = new TextFrameFormat();
textFrameFormat.setTextVerticalType(TextVerticalType.Vertical);
someTable.getColumns().get_Item(1).setTextFormat(textFrameFormat);

setTextFormat() methods have been added to com.aspose.slides.Row class due to inheritance from IBulkTextFormattable added to IRow interface

com.aspose.slides.Row class now implements IBulkTextFormattable interface as a part of IRow interface. Portion, paragraph or text frame format properties can be set to all column cells by calling Row.setTextFormat() methods.

Usage Examples:

ITable someTable = (ITable)presentation.getSlides().get_Item(0).getShapes().get_Item(0); // let's say that the first shape on the first slide is a table

// setting first row cells' font height
PortionFormat portionFormat = new PortionFormat();
portionFormat.setFontHeight(25);
someTable.getRows().get_Item(0).setTextFormat(portionFormat);

// setting first row cells' text alignment and right margin in one call
ParagraphFormat paragraphFormat = new ParagraphFormat();
paragraphFormat.setAlignment(TextAlignment.Right);
paragraphFormat.setMarginRight(20);
someTable.getRows().get_Item(0).setTextFormat(paragraphFormat);

// setting second row cells' text vertical type
TextFrameFormat textFrameFormat = new TextFrameFormat();
textFrameFormat.setTextVerticalType(TextVerticalType.Vertical);
someTable.getRows().get_Item(1).setTextFormat(textFrameFormat);

setTextFormat() methods have been added to com.aspose.slides.Table class due to inheritance from IBulkTextFormattable added to ITable interface

com.aspose.slides.Table class now implements IBulkTextFormattable interface as a part of ITable interface. Portion, paragraph or text frame format properties can be set to all table cells by calling Table.setTextFormat() methods.

Usage Examples:

ITable someTable = (ITable)presentation.getSlides().get_Item(0).getShapes().get_Item(0); // let's say that the first shape on the first slide is a table

// setting table cells' font height
PortionFormat portionFormat = new PortionFormat();
portionFormat.setFontHeight(25);
someTable.setTextFormat(portionFormat);

// setting table cells' text alignment and right margin in one call
ParagraphFormat paragraphFormat = new ParagraphFormat();
paragraphFormat.setAlignment(TextAlignment.Right);
paragraphFormat.setMarginRight(20);
someTable.setTextFormat(paragraphFormat);

// setting table cells' text vertical type
TextFrameFormat textFrameFormat = new TextFrameFormat();
textFrameFormat.setTextVerticalType(TextVerticalType.Vertical);
someTable.setTextFormat(textFrameFormat);

SlideSizeScaleType enum, com.aspose.slides.ISlideSize.SetSize() methods have been added

New methods setSize have been added to com.aspose.slides.SlideSize class and ISlideSize interface.

void setSize(SlideSizeType type, SlideSizeScaleType scaleType);
void setSize(float width, float height, SlideSizeScaleType scaleType);

These methods allow changing slide size with different ways of content scaling. Ways of content scaling are defined in new SlideSizeScaleType enum. There are following values.

  • DoNotScale - do not scale slide content. Use this for set the size without modification content.
  • EnsureFit - Scale to ensure fit. Use this for scale it down to ensure it will fit on slide.
  • Maximize - Maximize size of content. Use this for maximize the size of your content.

Usage example:

Presentation pres = new Presentation("presentation.ppt");
try {
    pres.getSlideSize().setSize(540, 720, SlideSizeScaleType.EnsureFit); // Method SetSize is used for set slide size with scale content to ensure fit
    pres.getSlideSize().setSize(SlideSizeType.A4Paper, SlideSizeScaleType.Maximize); // Method SetSize is used for set slide size with maximize size of content
} finally {
    pres.dispose();
}

Methods getSize(), setSize(Dimension2D) of interface ISlideSize and class SlideSize have been marked as Deprecated.

Methods getType(), setType(int i) of interface ISlideSize and class SlideSize have been marked as Deprecated.