Spire.Office 6.9.1已发布。本次更新带来了一些新功能,比如:Spire.Presentation支持添加数学公式和检测shape是否包含数学公式,支持在放映模式下隐藏音频,支持转换PPT到OFD,支持判断文档是否被加密;Spire.PDFViewer ASP.NET控件支持旋转页面,查找文本并高亮;Spire.XLS支持转换Excel到UOS,支持转换Excel到OFD,支持将Excel中透视表自动生成的values字段设置为行标签,支持将Excel中的组合图片或组合图表转换为一个图片;Spire.Doc支持设置Word中Frame的位置。此外,该版本还修复了大量一直问题。详情请阅以下内容。
该版本涵盖了最新版的Spire.Doc, Spire.PDF, Spire.XLS, Spire.Presentation, Spire.Email, Spire.DocViewer, Spire.PDFViewer, Spire.Spreadsheet, Spire.OfficeViewer, Spire.DataExport, Spire.Barcode。
版本信息如下:
- Spire.Doc.dll v9.9.6
- Spire.Pdf.dll v7.9.3
- Spire.XLS.dll v11.9.3
- Spire.Email.dll v4.7.0
- Spire.DocViewer.Forms.dll v6.8.0
- Spire.PdfViewer.Forms.dll v6.9.1
- Spire.PdfViewer.Asp.dll v6.9.1
- Spire.Presentation.dll v6.9.2
- Spire.Spreadsheet v5.6.1
- Spire.OfficeViewer.Forms.dll v6.9.1
- Spire.Barcode.dll v5.7.1
- Spire.DataExport.dll v4.1.9
- Spire.DataExport.ResourceMgr.dll v2.1.0
- Spire.License.dll v1.4.0
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
Spire.Presentation
新功能:
- 支持添加数学公式和检测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.PDFViewer
新功能:
- ASP.NET控件支持旋转页面
input type=button id=PdfDocumentViewer1_btnRotate onfocus=this.blur() onclick=pdfdocumentviewer1.Rotate(pdfdocumentviewer1.RotateAngle + 270); value=rotate_270
input type=text id=PdfDocumentViewer1_txtFindText onkeydown=if(event.keyCode==13){pdfdocumentviewer1.SearchText(this.value,true);return false;} value=
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.PdfDocumentViewer1.FindTextHighLightColor = System.Drawing.Color.FromArgb(125, 255, 0, 0);
this.PdfDocumentViewer1.LoadFromFile(input.pdf);
}
}
问题修复:
- 修复了PDF文档内容显示不正确的问题
- 修复了PDF文档中的中文字符显示错误的问题
- 修复了ASP.NET控件,未加载文档时弹出错误信息的问题
- 修复了图片将文本内容遮盖的问题
- 修复了PDF内容显示模糊的问题
Spire.PDF
问题修复:
- 修复了转换PDF到图片抛异常“System.ArgumentException”的问题
- 修复了打印结果不正确的问题
- 修复了转换PDF到图片抛异常“System.FormatException”的问题
- 修复了设置按钮域的图片抛异常“Value cannot be null”的问题
- 修复了加载文档抛异常“Unexpected token Eof before 986932”的问题
- 修复了合并文档后再加载文档抛异常“OutOfMemoryException”的问题
- 修复了PDF转图片抛异常“System.OverflowException”的问题
Spire.Doc
新功能:
- 支持设置Word中Frame的位置
问题修复:
- 修复了转换Word到PDF时,程序抛异常的问题
- 修复了Word中邮件合并时,当合并值包含"<"或">",生成文档的合并区域值不显示的问题
- 修复了转换Word到PDF后,生成文件的内容格式错误的问题
- 修复了向Word插入目录域后,生成文档中表格的边框消失的问题
- 修复了打印Word后,结果文件内容重叠的问题
- 修复了Word中邮件合并后,生成文档的合并结果错误的问题
- 修复了合并Word文档时,程序抛异常的问题
- 修复了转换RTF到Word时,程序抛异常的问题
- 修复了使用PS方法转换Word到PDF后,生成文件图片质量降低的问题
- 修复了加载文档时,程序抛异常的问题
Spire.XLS
新功能:
- 支持转换Excel到UOS
Workbook workbook = new Workbook();
workbook.LoadFromFile(xlsxFile);
workbook.SaveToFile(uosFile, FileFormat.UOS);
Workbook workbook = new Workbook();
workbook.LoadFromFile(xlsxFile);
workbook.SaveToFile(ofdFile, FileFormat.OFD);
pivottable.ShowDataFieldInRow = true;
pivottable.CalculateData();
List<Bitmap> images = sheet.SaveShapesToImage(new SaveShapeTypeOption());
for (int i = 0; i < images.Count; i++)
{
images[i].Save(string.Format(outputFile + "{0}.png", i), ImageFormat.Png);
}
问题修复:
- 修复了转换Excel到SVG后,生成图片不完整的问题
- 修复了转换Excel到SVG或图片后,饼图内容不正确的问题
- 优化了转换HTML到Excel的内容布局
- 修复了转换Excel中的图表到图片后,生成图片内容不正确的问题
- 修复了转换Excel中的图表到图片后,生成图片内容不正确的问题
- 修复了转换Excel到EMF流时,程序抛异常的问题
- 修复了转换XLSX到XLS格式后,使用IsPasswordProtected()方法只返回true的问题
- 修复了使用CalculateAllValue()方法时,程序堆栈溢出的问题
- 修复了转换Excel到PDF后,生成文档的垂直方向的分页错误的问题
- 修复了转换Excel到PDF后,生成文档和原始文档字体不一致的问题
- 修复了获取Excel中图表的数据范围时,程序抛异常的问题
- 修复了修改Excel中透视表的过滤器不生效的问题
- 修复了转换Excel到PDF时,程序抛异常的问题