Spire. Presentation 5.9.5现已发布。该版本支持对组合图形取消组合和GroupShapes方法返回GroupShape对象,并新增了GetPlaceholderShapes方法来通过占位符获取幻灯片母版版式中的形状的功能。此外,该版本还修复了转换加载PPTX文档,拷贝幻灯片等情况时出现的问题。详情请阅读以下内容。
新功能:
- 支持对组合图形取消组合。
GroupShape groupShape = presentation.Slides[0].Shapes[0] as GroupShape;
presentation.Slides[0].Ungroup(groupShape);
Placeholder placeholder = presentation.Slides[1].Shapes[0].Placeholder;
IShape[] shapes = presentation.Slides[1].GetPlaceholderShapes(placeholder);
for (int i = 0; i < shapes.Length; i++)
{
if (shapes[i] is IAutoShape)
{
IAutoShape autoShape = shapes[i] as IAutoShape;
if (autoShape.TextFrame != null)
{
Console.WriteLine(autoShape.TextFrame.Text);
}
}
}
ArrayList groupShapeList = new ArrayList();
groupShapeList.Add(shape1);
groupShapeList.Add(shape2);
groupShapeList.Add(shape3);
GroupShape groupshape = ppt.Slides[0].GroupShapes(groupShapeList);
问题修复:
- 修复了拷贝幻灯片到新文档时抛“DocumentEditException”的问题。
- 修复了组合图形后导致图形消失的问题。
- 修复了转换PPTX到HTML抛“NullReferenceException”的问题。
- 修复了加载PPTX文档抛“IndexOutOfRangeException”的问题。
- 修复了转换PPTX到PDF图表内容不正确的问题。
- 修复了加载受保护的PPT文档抛异常“Encrypted presentations are not supported”的问题。
获取Spire.Presentation 5.9.5,请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html