Spire.Presentation 5.8.5已于今日发布。该版本新增了Insert和Append方法用于添加节,同时也支持为节添加、移动、删除幻灯片,以及获取节的索引和删除节。除此之外,一些在转换PPT到PDF、加载、操作文档时出现的问题也得以成功解决。详情见下文。
新功能:
- 新增Insert和Append方法用于添加节。
Section sect01 = ppt.SectionList.Insert(0, "section1");
Section sect02 = ppt.SectionList.Append("section2");
ISlide slide01 = ppt.Slides.Append();
ISlide slide02 = ppt.Slides.Append();
Section section01 = ppt.SectionList.Add("section1", slide01);
Section section02 = ppt.SectionList.Insert(1, "section2");
Section section03 = ppt.SectionList.Append("section3");
//添加幻灯片
ISlide slide03 = ppt.SectionList.InsertSlide(section02, 0, slide01);
ISlide slide04 = section02.Insert(1, slide02);
section02.AddRange(new ISlide[] { slide03, slide04 });
//移动幻灯片
ppt.SectionList.MoveSlide(section03, 0, slide03);
section03.Move(1, slide04);
//删除幻灯片
ppt.SectionList.RemoveSlide(section03, 0);
section01.RemoveAt(0);
section02.RemoveRange(0, 3);
section03.Remove(slide04);
int index1 = ppt.SectionList.IndexOf(section01);
int index2 = section02.Index;
ppt.SectionList.RemoveAt(1);
ppt.SectionList.RemoveAll();
问题修复:
- 修复了加载文档抛“NullReferenceException”的问题。
- 修复了添加节失败的问题。
- 修复了转换PPT到PDF,内容丢失的问题。
- 修复了给potm文档设置属性后,结果文档打开报错的问题。
- 修复了给新增的SmartArt结点设置轮廓线条样式抛“NullReferenceException”的问题。
- 修复了修改Chart数据后,结果文档打开报错的问题。
获取Spire.Presentation 5.8.5,请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html