Spire.Presentation 6.8.3已发布。该版本支持加载保存DPS/DPT格式的文档,支持设置PPT中图表的边框样式为直角,同时还支持在PPT中,使用正则表达式替换文本。此外,本次更新还增强了转换PPT到PDF的功能。详情请阅读以下内容。
新功能:
- 支持加载保存DPS/DPT格式的文档
ppt.SaveToFile(outputPath + filename + ".dps", FileFormat.Dps);
ppt.SaveToFile(outputPath + filename + ".dpt", FileFormat.Dpt);
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
ITrendlines trendline = chart.Series[0].TrendLines[0] as ITrendlines;
foreach(TextParagraph para in trendline.TrendLineLabel.TextFrameProperties.Paragraphs)
{
para.DefaultCharacterProperties.FontHeight = 20;
foreach(TextRange range in para.TextRanges)
{
range.FontHeight = 20;
}
}
trendline.TrendLineLabel.OffsetX = -0.1f;
trendline.TrendLineLabel.OffsetY = 0.1f;
IChart chart = ppt.Slides[0].Shapes[0] as IChart;
chart.Line.FillFormat.FillType = FillFormatType.Solid;
chart.Line.FillFormat.SolidFillColor.Color = Color.Red;
chart.BorderRoundedCorners = false;
Regex regex = new Regex("^[A-Za-z]+$");
string newvalue = "new string";
foreach(IShape shape in ppt.Slides[0].Shapes)
{
shape.ReplaceTextWithRegex(regex, newvalue);
}
问题修复:
- 解决了在Linux环境下,转换PPT到PDF,OLE图标消失的问题
- 解决了删除PPT中chart图形的趋势线类型的图例时,程序抛异常的问题
- 解决了设置PPT中图表的图例和坐标轴字体后,生成文档字体应用错误的问题
- 解决了转换PPT到PDF,超链接失效的问题
- 解决了转换PPT到PDF,生成文件多出线条的问题
- 解决了高亮PPT中包含“)”的文本时,程序抛异常的问题
获取Spire.Presentation 6.8.3请点击:
https://www.e-iceblue.cn/Downloads/Spire-Presentation-NET.html