Spire.Presentation 6.9.2已发布。本次更新支持了添加数学公式和检测shape是否包含数学公式,支持在放映模式下隐藏音频,同时还支持判断文档是否被加密等功能。详情请阅读以下内容。
新功能:
- 支持添加数学公式和检测shape是否包含数学公式
Presentation ppt = new Presentation();
string latexMathCode = @"x^{2}+\sqrt{x^{2}+1}=2";
IAutoShape shape = ppt.Slides[0].Shapes.AppendShape(ShapeType.Rectangle, new RectangleF(30, 100, 400, 30));
shape.TextFrame.Paragraphs.Clear();
//Add math equation
TextParagraph tp = shape.TextFrame.Paragraphs.AddParagraphFromLatexMathCode(latexMathCode);
for (int i = 0; i < ppt.Slides[0].Shapes.Count; i++)
{
if (ppt.Slides[0].Shapes[i] is IAutoShape)
{
//Check whether shape contains math equations
bool containMathEquation = (ppt.Slides[0].Shapes[i] as IAutoShape).ContainMathEquation;
}
}
ppt.SaveToFile("result.pptx", FileFormat.Pptx2013);
ppt.Dispose();
Presentation ppt = new Presentation();
ppt.LoadFromFile(inputFile);
foreach(Shape shape in ppt.Slides[0].Shapes)
{
if(shape is IAudio)
{
IAudio audio = shape as IAudio;
audio.HideAtShowing = true;
}
}
Presentation ppt = new Presentation();
ppt.LoadFromFile(inputFile);
ppt.SaveToFile(ofdFile, FileFormat.OFD);
Presentation ppt = new Presentation();
ppt.IsPasswordProtected(inputFile)
问题修复:
- 修复了添加趋势线后没有初始化趋势线标题的问题
- 修复了高亮文本失败的问题
- 修复了转换PPT到PDF,超链接丢失的问题
- 修复了插入新的音频后,原有视频无法播放的问题
- 修复了设置Doughnut chart 的切片角度不生效的问题
- 修复了加载加密的PPT文档抛异常“DocumentReadException”的问题
获取Spire.Presentation 6.9.2请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html