Spire.Presentation 9.9.2 support setting the global font directory when execute conversion feature

2024-09-20 09:37:10

We're glad to announce the release of Spire.Presentation 9.9.2. This version supports setting the global font directory when execute conversion feature, and also adds two properties to obtain the last row and last column of the chart's data source. Moreover, two issues that occurred when converting PPTX to SVG, and copying shapes have been successfully fixed. Check below for more details.

Here is a list of changes made in this release

Category ID Description
New feature SPIREPPT-2567 Supports setting the global font directory when execute the conversion function.
Presentation.SetCustomFontsDirctory("myfonts");
New feature SPIREPPT-2594 Adds the "IChart.ChartData.LastRowIndex" and "IChart.ChartData.LastColIndex" properties to obtain the last row and last column of the chart's data source.
Presentation ppt = new Presentation();
ppt.LoadFromFile(inputFile);
StringBuilder stringBuilder= new StringBuilder();
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
if (chart != null)
{
	int lastRow = chart.ChartData.LastRowIndex;
	int lastCol = chart.ChartData.LastColIndex;
	sb.AppendLine("lastRow" + lastRow + "\r\n" + "lastColumn" + lastCol);
	int dataRow = chart.Series[2].Values[chart.Series[2].Values.Count - 1].Row; 
	int dataColumn = chart.Series[2].Values[chart.Series[2].Values.Count - 1].Column; 
	sb.AppendLine("dataRow" + datarow + "\r\n" + "dataColumn" + dataColumn);
	chart.ChartData.Clear(dataRow + 1, 0, lastRow + 1, lastCol + 1);  
	chart.ChartData.Clear(0, dataColumn + 1, lastRow + 1, lastCol + 1); 
}
File.WriteAllText(outputFile_T,stringBuilder.ToString());
ppt.SaveToFile(outputFile, FileFormat.Pptx2013);
ppt.Dispose();
Bug SPIREPPT-2582 Fixes the issue that the type changed from "graphic" to "image" when copying shapes.
Bug SPIREPPT-2590 Fixes the issue that the content was incorrect when converting PPTX documents to SVG documents.
Click the link to download Spire.Presentation 9.9.2:
More information of Spire.Presentation new release or hotfix: