Browse our Products

Aspose.Slides for Java 19.12 Release Notes

KeySummaryCategory
SLIDESJAVA-37451Use Aspose.Slides for .NET 19.12 featuresFeature
SLIDESNET-41274Add color to Data PointsFeature
SLIDESNET-41487Restrict printing in PDF fileFeature
SLIDESNET-41510PDF access permissionsFeature
SLIDESNET-38950ODP to PDF: Bullets numbering is missingEnhancement
SLIDESNET-41184Slides are not placed into proper sectionsEnhancement
SLIDESJAVA-37469Font Fallback in Aspose.SlidesEnhancement
SLIDESJAVA-37829Exception: Font is already substituted on exporting to PDFBug
SLIDESJAVA-37834StackOverflowError has been thrown on converting PPT to PDFBug
SLIDESJAVA-37878PPTX not properly converted to PDFBug
SLIDESJAVA-37997Extracting cropped portion of embedded audio data from Audio frameBug
SLIDESJAVA-38003Text get overlapped in generated shape thumbnailBug
SLIDESJAVA-37835PPTX to PDF: “Specified argument was out of the range of valid values” exception has been thrownBug
SLIDESJAVA-37833Null exception has been thrown on converting PPT to PDFBug
SLIDESJAVA-37994Improper text rendering in a generated thumbnail on RHEL 7.7Bug
SLIDESJAVA-37995PPTX to PNG - text is appearing as garbage characters for OpenJDKBug
SLIDESJAVA-37607Slides are not placed into proper sectionsBug
SLIDESJAVA-37296Lost Formatting after saving PPTXBug
SLIDESJAVA-37832Text rendering issue with OpenJDKBug

Public API Changes

Data Points of Treemap and Sunburst Chart

Among other types of PowerPoint charts, there are two “hierarchical” types - Treemap and Sunburst chart (also known as Sunburst Graph, Sunburst Diagram, Radial Chart, Radial Graph or Multi Level Pie Chart). These charts display hierarchical data organized as a tree - from leaves to the top of the branch. Leaves are defined by the series data points, and each subsequent nested grouping level defined by the corresponding category. Aspose.Slides for Java allows to format data points of Sunburst Chart and Treemap in Java.

Here is a Sunburst Chart, where data in Series1 column define the leaf nodes, while other columns define hierarchical datapoints:

todo:image_alt_text

Let’s start with adding a new Sunburst chart to the presentation:

Presentation pres = new Presentation();
try
{
   IChart chart = pres.getSlides().get_Item(0).getShapes().addChart(ChartType.Sunburst, 100, 100, 450, 400);
   // ...
} finally {
   if (pres != null) pres.dispose();
}

Read more about Creating Sunburst Chart.

If there is a need to format data points of the chart, we should use the following:

IChartDataPointLevelsManagerIChartDataPointLevel  classes and IChartDataPoint. getDataPointLevels()  method provide access to format data points of Treemap and Sunburst charts. IChartDataPointLevelsManager is used for accessing multi-level categories - it represents the container of  IChartDataPointLevel objects. Basically it is a wrapper for IChartCategoryLevelsManager with the properties added specifically for data points. IChartDataPointLevel class has two methods: getFormat() and getLabel() which provide access to corresponding settings.

Show Data Point Value

Show value of “Leaf 4” data point:

IChartDataPointCollection dataPoints = chart.getChartData().getSeries().get_Item(0).getDataPoints();
dataPoints.get_Item(3).getDataPointLevels().get_Item(0).getLabel().getDataLabelFormat().setShowValue(true);

todo:image_alt_text

Set Data Point label and its color

Set “Branch 1” data label to show a series name (“Series1”) instead of the category name. Then set the text color to yellow:

IDataLabel branch1Label = dataPoints.get_Item(0).getDataPointLevels().get_Item(2).getLabel();
branch1Label.getDataLabelFormat().setShowCategoryName(false);
branch1Label.getDataLabelFormat().setShowSeriesName(true);
branch1Label.getDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().setFillType(FillType.Solid);
branch1Label.getDataLabelFormat().getTextFormat().getPortionFormat().getFillFormat().getSolidFillColor().setColor(Color.YELLOW);

todo:image_alt_text

Set Data Point Branch Color

Change color of “Steam 4” branch:

IFormat steam4Format = dataPoints.get_Item(9).getDataPointLevels().get_Item(1).getFormat();
steam4Format.getFill().setFillType(FillType.Solid);
steam4Format.getFill().getSolidFillColor().setColor(new Color(0, 176, 240, 255));

todo:image_alt_text

getAccessPermissions() and setAccessPermissions() methods have been added to IPdfOptions interface and PdfOptions class

getAccessPermissions() and setAccessPermissions() methods have been added to IPdfOptions interface and PdfOptions class. All possible values of this property are defined in the PdfAccessPermissions class. These values allow you to restrict access rights to a PDF document such as printing, modify the contents, copy text and graphics, add or modify text annotations, create or modify interactive form fields, extract text and graphics in support of accessibility to users with disabilities, create bookmarks, manipulate pages, etc. The values of this enumeration may be combined.

Example

The example below demonstrates how to set access permissions to a PDF document only for printing in high quality.

PdfOptions pdfOptions = new PdfOptions();
pdfOptions.setPassword("my_password");
pdfOptions.setAccessPermissions(PdfAccessPermissions.PrintDocument | PdfAccessPermissions.HighQualityPrint);
Presentation presentation = new Presentation();
try {
   presentation.save(pdfFilePath, SaveFormat.Pdf, pdfOptions);
} finally {
   if (presentation != null) presentation.dispose();
}

ISlideCollection.addClone() method has been added

addClone() method has been added to ISlideCollection interface and SlideCollection class. This method allows adding a slide clone into a specified section.

Method declaration:

/**
 * <p>
 * Adds a copy of a specified slide to the end of the specified section.
 * </p>
 * @return New slide.
 * @param sourceSlide Slide to clone.
 * @param section Section for a new slide.
 * <pre>
 * IPresentation presentation = new Presentation();
 * try
 * {
 *     presentation.getSlides().get_Item(0).getShapes().addAutoShape(ShapeType.Rectangle, 200, 50, 300, 100);
 *     presentation.getSections().addSection("Section 1", presentation.getSlides().get_Item(0));
 *     
 *     ISection section2 = presentation.getSections().appendEmptySection("Section 2");
 *     presentation.getSlides().addClone(presentation.getSlides().get_Item(0), section2);
 *     
 *     // Now the second section contains a copy of the first slide.
 * } finally {
 *     if (presentation != null) presentation.dispose();
 * }
 * </pre>
 */
public ISlide addClone(ISlide sourceSlide, ISection section);