Spire.Presentation 5.8.1已发布。该版本支持添加节、设置SmartArt节点轮廓线条样式和节点间的连接线条样式,并修复了将PPT转为PDF时出现的问题。新功能及问题修复详情如下。
新功能:
- 支持添加节
Presentation presentation = new Presentation();
presentation.LoadFromFile(pptfile);
ISlide slide = presentation.Slides[0];
//添加节
presentation.SectionList.Add("section1", slide);
//获取节
Section section;
String name;
for (int i = 0; i < presentation.SectionList.Count; i++)
{
section = presentation.SectionList[i];
name = section.Name;
foreach (long id in section.SlideIdList)
{
}
}
ISmartArt smartArt = presentation.Slides[0].Shapes[0] as ISmartArt;
int count =smartArt.Nodes.Count;
ISmartArtNode node;
for (int i = 0; i < count; i++)
{
node = smartArt.Nodes[i];
node.Line.FillType = FillFormatType.Solid;
node.Line.SolidFillColor.Color = Color.Gray;
node.Line.Width = 2;
}
ISmartArt smartArt = presentation.Slides[0].Shapes[0] as ISmartArt;
int count =smartArt.Nodes.Count;
ISmartArtNode node;
for (int i = 0; i < count; i++)
{
node = smartArt.Nodes[i];
node.LinkLine.FillType = FillFormatType.Solid;
node.LinkLine.SolidFillColor.Color = Color.Gray;
node.LinkLine.Width = 2;
node.LinkLine.DashStyle = LineDashStyleType.SystemDash;
}
问题修复:
- 修复了转换PPT到PDF内容后部分丢失的问题
获取Spire.Presentation 5.8.1,请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html