Aspose.Slides for .NET 17.3 Release Notes

Key Summary Category
SLIDESNET-38440 Get audio/video rendered as audio/video in Html Feature
SLIDESNET-38361 Support of detection Microsoft PowerPoint 95 presentations Feature
SLIDESNET-38354 Loading fonts from assembly Feature
SLIDESNET-38192 Support to get chart external data source workbook path Feature
SLIDESNET-38149 Get Actual Max value of vertical axis on a chart Feature
SLIDESNET-37586 Getting actual absolute X,Y values for chart data points Feature
SLIDESNET-34526 Support for adding line in chart area Feature
SLIDESNET-38426 Create new chart base on style of existing chart Feature
SLIDESNET-38436 When PPT file is saved as PDF, the percentage sign goes on the wrong side Bug
SLIDESNET-38425 When PPTX is saved as PDF by using PdfCompliance.PdfA1b, the System.ArgumentException occurs Bug
SLIDESNET-38401 Chart Plot Area is improperly rendered in generated PDF Bug
SLIDESNET-38386 PPTX to PDF graph not rendering correctly Bug
SLIDESNET-38385 PPTX to PDF table not rendering Bug
SLIDESNET-38381 Black background when rendering pps or ppt to image Bug
SLIDESNET-38363 File corrupted after saving Bug
SLIDESNET-38324 Exception while converting PPTX to PDF: Value too large or too small Bug
SLIDESNET-38314 Round brackets are improperly rendered in generated PDF Bug
SLIDESNET-38288 After load and save of PPT file, the footer disappears. Bug
SLIDESNET-38286 The background color of a shape was changed from white to green in a specific PPT Bug
SLIDESNET-38283 Fonts changed after saving ppt Bug
SLIDESNET-38282 Text position changed after saving ppt Bug
SLIDESNET-38232 Text being overlapped with Image Bug
SLIDESNET-38224 Rendering issues when converting from PPTX to PDF Bug
SLIDESNET-38223 Squares are changed after loading and saving a ppt Bug
SLIDESNET-38221 Ppt changed after saving Bug
SLIDESNET-38178 When saving as pdf the hyperlink (URLs) becomes mojibake Bug
SLIDESNET-38134 Ppt not properly converted to html Bug
SLIDESNET-38088 Ppt changes after saving Bug
SLIDESNET-38024 Missing characters in converted svg and thumbnail when uses ReplaceFont() Bug
SLIDESNET-37557 An animation star is added to all of the slides after loading and saving a ppt Bug
SLIDESNET-37463 Problem while translating the pdf generated by Aspose.Slides Bug
SLIDESNET-37102 Animations in MasterSlide lost on ppt load and save Bug
SLIDESNET-37101 Transitions appear on ppt load and save Bug
SLIDESNET-34336 Wrong value axis Maximum value on value axis scale Bug

Public API Changes

ActualMaxValue, ActualMinValue, ActualMajorUnit, ActualMinorUnit, ActualMajorUnitScale, ActualMinorUnitScale have been added to Axis, IAxis

  • double ActualMaxValue         Gets actual maximum value on the axis.
  • double ActualMinValue         Gets actual minimum value on the axis.
  • double ActualMajorUnit         Gets actual major unit of the axis.
  • double ActualMinorUnit        Gets actual minor unit of the axis.
  • TimeUnitType ActualMajorUnitScale            Gets actual major unit scale of the axis.
  • TimeUnitType ActualMinorUnitScale            Gets actual minor unit scale of the axis.

Call method IChart.ValidateChartLayout() previously to get actual values for these properties.

using (Presentation pres = new Presentation())
{
     Chart chart = (Chart)pres.Slides[0].Shapes.AddChart(ChartType.Area, 100, 100, 500, 350);
     chart.ValidateChartLayout();

     double maxValue = chart.Axes.VerticalAxis.ActualMaxValue;
     double minValue = chart.Axes.VerticalAxis.ActualMinValue;

     double majorUnit = chart.Axes.HorizontalAxis.ActualMajorUnit;
     double minorUnit = chart.Axes.HorizontalAxis.ActualMinorUnit;
}

ActualX, ActualY, ActualWidth, ActualHeight have been added to IChartPlotArea, ChartPlotArea

float ActualX  Gets actual X location (left) of the chart element relative to the left top corner of the chart. Call method IChart.ValidateChartLayout() before to get actual values.

  • float ActualY  Gets actual top of the chart element relative to the left top corner of the chart. Call method IChart.ValidateChartLayout() before to get actual values.
  • float ActualWidth       Gets actual width of the chart element. Call method IChart.ValidateChartLayout() before to get actual values.
  • float ActualHeight      Gets actual height of the chart element. Call method IChart.ValidateChartLayout() before to get actual values.

Call method IChart.ValidateChartLayout() previously to get actual values for these properties.

using (Presentation pres = new Presentation())
{
     Chart chart = (Chart)pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 100, 100, 500, 350);
     chart.ValidateChartLayout();

     double x = chart.PlotArea.ActualX;
     double y = chart.PlotArea.ActualY;
     double w = chart.PlotArea.ActualWidth;
     double h = chart.PlotArea.ActualHeight;
}

DataSourceType and ExternalWorkbookPath properties has been added to IChartData interface and ChartData class

Two new properties have been added to IChartData interface and ChartData class:

DataSourceType of type ChartDataSourceType, which represents data source of the chart.

ExternalWorkbookPath of type string, which represents external workbook path if data source is external, null otherwise.

ChartDataSourceType is a new enum which represents the two values: InternalWorkbook and ExternalWorkbook.

Example:

using (Presentation pres = new Presentation("pres.pptx"))
{
     ISlide slide = pres.Slides[1];
     IChart chart = (IChart)slide.Shapes[0];
     ChartDataSourceType sourceType = chart.ChartData.DataSourceType;
     if (sourceType == ChartDataSourceType.ExternalWorkbook)
     {
         string path = chart.ChartData.ExternalWorkbookPath;
     }
}

IActualLayout interface has been added

Properties of IActualLayout provide information about actual position of parent chart element. It is necessary to call method IChart.ValidateChartLayout() previously to fill properties with actual values.

using (Presentation pres = new Presentation())
{
     Chart chart = (Chart)pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 100, 100, 500, 350);
     chart.ValidateChartLayout();

     double x = chart.PlotArea.ActualX;
     double y = chart.PlotArea.ActualY;
     double w = chart.PlotArea.ActualWidth;
     double h = chart.PlotArea.ActualHeight;
}

Method ValidateChartLayout() has been added to IChart interface and Chart class

Calculates actual values of chart elements. The actual values include position of elements that implement IActualLayout interface (IActualLayout.ActualX, IActualLayout.ActualY, IActualLayout.ActualWidth, IActualLayout.ActualHeight) and actual axes values (IAxis.ActualMaxValue, IAxis.ActualMinValue, IAxis.ActualMajorUnit, IAxis.ActualMinorUnit, IAxis.ActualMajorUnitScale, IAxis.ActualMinorUnitScale).

using (Presentation pres = new Presentation())
{
     Chart chart = (Chart)pres.Slides[0].Shapes.AddChart(ChartType.ClusteredColumn, 100, 100, 500, 350);
     chart.ValidateChartLayout();
     double x = chart.PlotArea.ActualX;
     double y = chart.PlotArea.ActualY;
     double w = chart.PlotArea.ActualWidth;
     double h = chart.PlotArea.ActualHeight;
}

New method LoadExternalFont has been added to FontsLoader class

The new method LoadExternalFont has been added to FontsLoader class:

public static void LoadExternalFont(byte[] data)

This method allows to add font from the binary data.

// loading presentation uses SomeFont which is not installed on the system
using(Presentation pres = new Presentation("pres.pptx")
{
     // load SomeFont from file into the byte array
     byte[] fontData = File.ReadAllBytes(@"fonts\SomeFont.ttf"));

     // load font represented as byte array
     FontsLoader.LoadExternalFont(fontData);

     // font SomeFont will be available during the rendering or other operations
}

Ppt95 value has been added to Aspose.Slides.LoadFormat enumeration

The new Ppt95 value has been added to Aspose.Slides.LoadFormat enumeration. This value represents Microsoft PowerPoint 95 presentation format.

Code snippet to check whether the presentation format is old Microsoft PowerPoint 95:

bool isOldFormat = PresentationFactory.Instance.GetPresentationInfo(path).LoadFormat == LoadFormat.Ppt95;