Spire.Office 8.8.0 已发布。在该版本中,Spire.PDF 支持 PDF 文档文本比较功能以及在将 PDF 转换为 Word 时保留相同的字体名字;Spire.Presentation 新增了用于重置文档转换默认字体列表的方法;Spire.XLS 支持设置 DIN A0 的纸张大小以及灰度打印。此外,许多已知问题也在该版本中成功修复。详情请阅读以下内容。
该版本涵盖了最新版的 Spire.Doc,Spire.PDF,Spire.XLS,Spire.Email,Spire.DocViewer, Spire.PDFViewer,Spire.Presentation,Spire.Spreadsheet, Spire.OfficeViewer, Spire.DocViewer, Spire.Barcode, Spire.DataExport。
版本信息如下:
- Spire.Doc.dll v11.7.25
- Spire.Pdf.dll v9.7.17
- Spire.XLS.dll v13.8.0
- Spire.Presentation.dll v8.7.4
- Spire.Email.dll v6.6.0
- Spire.DocViewer.Forms.dll v8.7.0
- Spire.PdfViewer.Forms.dll v7.11.0
- Spire.PdfViewer.Asp.dll v7.11.0
- Spire.Spreadsheet.dll v7.4.2
- Spire.OfficeViewer.Forms.dll v8.8.0
- Spire.Barcode.dll v7.2.1
- Spire.DataExport.dll v4.9.0
- Spire.DataExport.ResourceMgr.dll v2.1.0
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
Spire.PDF
新功能:
- 支持在将PDF转换为Word时保留相同的字体名字。
- 支持在加密PDF文档时使用新接口设置加密选项。
- 支持PDF文档的文本比较功能。
PdfDocument doc = new PdfDocument();
//Add a new page
PdfPageBase page = doc.Pages.Add();
PdfGrid grid = new PdfGrid();
grid.Columns.Add(1);
PdfGridRow headerRow1 = grid.Headers.Add(1)[0];
//HEADER WITHOUT UNCICODE SUPPORT BUT VALID WORD FONT
headerRow1.Style.Font = new PdfTrueTypeFont(new Font("Arial", 11f, FontStyle.Regular), true);
headerRow1.Cells[0].Value = "Spire.PDF for .NET";
headerRow1.Cells[0].StringFormat = new PdfStringFormat(PdfTextAlignment.Center, PdfVerticalAlignment.Middle);
grid.Draw(page, new PointF(0, 10));
//Save the document to stream
MemoryStream stream = new MemoryStream();
doc.SaveToStream(stream, FileFormat.PDF);
stream.Position = 0L;
PdfToWordConverter converter = new PdfToWordConverter(stream);
converter.SaveToDocx(@"out.docx");
PdfDocument doc = new PdfDocument();
doc.LoadFromFile(@"in.pdf");
PdfSecurityPolicy securityPolicy = new PdfPasswordSecurityPolicy(userPassword, ownerPassword);
securityPolicy.EncryptMetadata = false;
securityPolicy.EncryptionAlgorithm = PdfEncryptionAlgorithm.AES_128;
securityPolicy.DocumentPrivilege = PdfDocumentPrivilege.AllowAll;
securityPolicy.DocumentPrivilege.AllowPrint = false;
doc.Encrypt(securityPolicy);
doc.SaveToFile(@"out.pdf");
PdfDocument pdf1 = new PdfDocument(inputFile_1);
PdfDocument pdf2 = new PdfDocument(inputFile_2);
PdfComparer compare = new PdfComparer(pdf1, pdf2);
compare.Options.SetPageRanges(0, pdf1.Pages.Count - 1, 0, pdf2.Pages.Count - 1);
compare.Compare(outputFile);
问题修复:
- 修复了将PDF转换为图像时内容丢失的问题。
- 修复了打印PDF文件后,表格边框粗的问题。
- 修复了打开转换后的PDFA3B文件时出现提示“cannot extract the embedded font”的问题。
- 修复了文件添加水印时获得的PDF页数不正确的问题。
- 优化将PDF转换为图像时的内存消耗。
- 修复了应用程序在加载PDF文件时抛“System.NullReferenceException”的问题。
- 修复了应用程序在加载XPS文件时抛“System.IndexOutOfRangeException”的问题。
- 修复了将PDF转换为图像后结果是黑色的问题。
- 修复了应用程序在将PDF文件转换为图像时引发“System.NullReferenceException”的问题。
- 修复了移除Form域方法未生效的问题。
- 修复了将PDF转换为OFD时消耗资源多的问题。
- 修复了将PDF 转换为图像以及打印PDF时,特殊的欧洲字母(ü ä ö)显示不正确的问题。
- 修复了获取图片时,程序抛出空指针的问题。
- 修复了添加不可见签名后,“外观完整性报告”中多出一条错误信息的问题。
- 修复了提取表格时,程序抛出“System.Exception: 无法从带有索引像素格式的图像创建 Graphics 对象。” 的问题。
Spire.Presentation
新功能:
- 新增了用于设置在转换pdf或者图片等格式并且系统未安装文档需要的字体时优先使用的字体的方法。
- 新增了用于重置文档转换默认字体列表的方法。
presentation.setDefaultFontName("华文行楷");
presentation.resetDefaultFontName();
问题修复:
- 修复了转换PPT文档到图片时图表丢失的问题。
- 修复了操作图表数据后结果文件打开失败的问题。
- 修复了加载PPT文档程序抛Spire.Presentation.DocumentUnkownFormatException异常的问题。
- 修复了修改超链接的文本颜色不生效的问题。
Spire.XLS
新功能:
- 支持了设置DIN A0 的纸张大小。
- 支持了灰度打印。
- 优化了转换XLSX到HTML文档耗时长且内存占用高的性能。
sheet.PageSetup.PaperSize = PaperSizeType.PaperA0;
workbook.ConverterSetting.GrayLevelForPrint = true;
问题修复:
- 修复了转换Excel到图片图表丢失的问题。
- 修复了转换形状到图片时内容不正确的问题。
- 修复了进行数字签名时程序抛出System.Security.Cryptography.CryptographicException: 'Invalid algorithm specified异常的问题。
- 修复了替换字体失败的问题。
- 修复了修改形状中的文本后样式发生改变的问题。
- 修复了为多个单元格设置数字格式后边框被改变的问题。
- 修复了转换Excel到PDF周数计算不正确的问题。
- 修复了移除形状后PrstGeomShapes集合未更新的问题。
- 修复了转换Excel到PDF多出上边框的问题。
- 修复了获取单元格的条件格式失败的问题。
- 修复了转换Excel到PDF内容不一致的问题。
Spire.Doc
问题修复:
- 修复了转换Word到PDF后页眉换行的问题。
- 修复了转换Word到PDF后超链接失效的问题。
- 修复了转换Word到PDF后内容布局错误的问题。
- 修复了更新目录页码不生效的问题。
- 修复了填充的域值末尾多出"\r"的问题。
- 修复了邮件合并域填充值更新不正确的问题。
- 修复了转换HTML到Word后公式显示不正确的问题。
- 修复了加载文档另存为新文档后内容丢失的问题。
- 修复了添加Latex公式后不等号解析不正确的问题。
- 修复了添加Latex公式后平行符号解析不正确的问题。
- 修复了添加Latex公式后向量符号位置不正确的问题。