我们很高兴地宣布 Spire.Office 11.6.1 正式发布。在此版本中,Spire.Doc 增强了 Word 转 PDF 的转换效果;Spire.PDF 优化了 PDF 转固定布局 Word 的解析逻辑;Spire.XLS 调整了 Worksheet.SaveToPdf 方法;Spire.Presentation 新增支持将公式导出为 MathML 和 LaTeX 格式。此外,本版本还成功修复了大量已知问题,进一步提升了产品的稳定性和性能。更多更新内容如下。
本次发布集成了以下组件的最新版本:Spire.Doc、Spire.PDF、Spire.XLS、Spire.Presentation、Spire.Barcode、Spire.DocViewer、Spire.PDFViewer、Spire.Email、Spire.Spreadsheet 和 Spire.OfficeViewer。
版本信息如下:
- Spire.Barocde.dll: 7.5.0
- Spire.Doc.dll: 14.6.13
- Spire.DocViewer.dll: 8.9.5
- Spire.Email.dll: 6.8.0
- Spire.OfficeViewer.dll: 8.8.1
- Spire.Pdf.dll: 12.6.9
- Spire.PdfViewer.dll: 8.3.0
- Spire.Presentation.dll: 11.6.11
- Spire.Spreadsheet.dll: 7.5.3
- Spire.XLS.dll: 16.6.3
获取Spire.Office 11.6.1,请点击:
https://www.e-iceblue.cn/Downloads/Spire-Office-NET.html
Spire.Doc
优化:
- 优化了修订功能,部分接受修订效果有改善。
问题修复:
- 修复了转换Word到PDF时,接受修订后结果不正确的问题。
Spire.XLS
调整:
- 移除了 Worksheet.SaveToPdf() 方法中传递的 FileFormat 参数。
问题修复:
- 修复了转换图表到图片时,程序抛出 IndexOutOfRangeException 异常的问题。
- 修复了调用 CalculateAllValue 方法计算公式值不正确的问题。
- 修复了调用 CalculateAllValue 方法计算公式值耗时长的问题。
- 修复了加载 ODS 文件时,程序抛出 “Key cannot be null” 异常的问题。
Spire.Presentation
新功能:
- 支持配置默认字体。
- 支持导出公式为 MathML 与 LaTeX 代码。
// 设置默认字体
Presentation.SetDefaultLatinFontName("Arial");
Presentation.SetDefaultEastAsianFontName("微软雅黑");
// 重置/恢复默认的字体设置
Presentation.ResetDefaultEastAsianFontName();
Presentation.ResetDefaultLatinFontName();
IAutoShape shapeFormula = slide.Shapes.AppendShape(ShapeType.Rectangle,new RectangleF(40, currentTop, shapeWidth, formulaHeight));
// 插入 LaTeX 公式
TextParagraph formulaPara = shapeFormula.TextFrame.Paragraphs.AddParagraphFromLatexMathCode(latex);
// 导出 MathML
string mathML = formulaPara.ExportMathML();
// 导出 LaTex
string LaTex = formulaPara.ExportLaTex();
问题修复:
- 修复了 PowerPoint 转 SVG 时单词被拆分的问题。
- 修复了 PowerPoint 转 PDF 时图表数据格式不正确的问题。
- 修复了获取 PowerPoint 图片对应 Shape 不正确的问题。
- 修复了 PowerPoint 转 PDF 时文本形状位置偏移的问题。
- 修复了 PowerPoint 转 PDF 时图片丢失的问题。
Spire.PDF
调整:
| 旧类名 | 新类名 | 旧属性名 | 新属性名 |
|---|---|---|---|
| PdfLaunchAction | PdfLaunchAction | IsNewWindow | NewWindow |
| PdfActionDestination | PdfPredefinedAction | ||
| PdfEmbeddedGoToAction | PdfEmbeddedGoToAction | IsNewWindow | NewWindow |
| PdfResetAction | PdfResetFormAction | ||
| PdfSubmitAction | PdfSubmitFormAction | ||
| PdfUriAction | PdfURIAction | Uri | URI |
| PdfFieldActions | PdfFormFieldAdditionalActions | ||
| PdfAnnotationActions | PdfAnnotationAdditionalActions | MouseEnter | OnEnter |
| MouseLeave | OnExit | ||
| MouseDown | OnMouseDown | ||
| MouseUp | OnMouseUp | ||
| GotFocus | OnReceiveFocus | ||
| LostFocus | OnLostFocus | ||
| Calculate | / | ||
| Validate | / | ||
| KeyPressed | / | ||
| Format | / | ||
| PdfDocumentActions | PdfDocumentAdditionalActions | Calculate | OnCalculate |
| Validate | OnValidate | ||
| KeyPressed | OnModifyCharacter | ||
| Format | OnFormat | ||
| MouseEnter | OnEnter | ||
| MouseLeave | OnExit | ||
| MouseDown | OnMouseDown | ||
| MouseUp | OnMouseUp | ||
| GotFocus | OnReceiveFocus | ||
| LostFocus | OnLostFocus |
| 旧类名 (Spire.Pdf.General命名空间) |
新类名 (Spire.Pdf.Destinations命名空间) |
旧属性名 | 新属性名 |
|---|---|---|---|
| PdfDestination | PdfDestination, PdfExplicitDestination |
||
| PdfDestination (Mode=Location) |
PdfXYZExplicitDestination | Location | Left, Top |
| Rectangle | / | ||
| Mode | Type | ||
| PdfDestination (Mode=FitToPage) |
PdfFitExplicitDestination | Location | / |
| Rectangle | / | ||
| Zoom | / | ||
| Mode | Type | ||
| PdfDestination (Mode=FitH) |
PdfFitHExplicitDestination | Location | Top |
| Rectangle | / | ||
| Zoom | / | ||
| Mode | Type | ||
| PdfDestination (Mode=FitR) |
PdfFitRExplicitDestination | Location | / |
| Rectangle | Left,Bottom, Right, Top | ||
| Zoom | / | ||
| Mode | Type | ||
| PdfDestination (Mode=FitV) |
PdfFitVExplicitDestination | Location | Left |
| Rectangle | / | ||
| Zoom | / | ||
| Mode | Type | ||
| PdfFitBExplicitDestination | |||
| PdfFitBVExplicitDestination | / | Left |
- 调整了 PDF 转固定版式 Word 的内部解析逻辑。 部分文档的转换结果可能会出现轻微差异。
问题修复:
- 修复了将 XPS 转换为 PDF 时,生成的 PDF 文档出现错误的问题。
- 修复了将 XPS 转换为 PDF 时,字符发生重叠的问题。
- 修复了将 PDF 转换为 PDF/X-1a:2001 标准时,图像背景变为黑色的问题。
- 修复了合并 PDF 文档时程序抛出 “The index can not be less then zero or greater then Count” 异常的问题。
- 修复了使用 PdfToWordConverter 时,生成的 DOCX 文档页面尺寸不正确的问题。
- 修复了生成的结构化 PDF 文档无法通过 PDF/UA(ISO 14289-1)标准验证的问题。
- 修复了解析个别损坏文档时程序无响应的问题。
- 修复了 PDF 转 HTML 时出现格式不一致的问题。
- 修复了 XPS 转 PDF 时抛出 “Invalid font metrics” 异常的问题。
Spire.OCR
问题修复:
- 修复了 OCR 引擎识别图片无法保留缩进与行间距的问题。
Spire.PdfViewer
问题修复:
- 修复了预览 PDF 文件报 “ArgumentNullException” 的问题。







