Spire.Office for Java 9.11.0 已正式发布。在该版本中,Spire.PDF for Java支持使用 ChromeHTMLConverter 将HTML字符串转换为PDF,还支持在使用 ChromeHTMLConverter 转换 HTML 到 PDF 时开启“背景图形”。除此之外,一些在转换、操作、保存Word、Excel、PDF 和 PPT 文档时出现的问题也已成功被修复。更多新功能及问题修复详情如下。
获取 Spire.Office for Java 9.11.0,请点击:https://www.e-iceblue.cn/Downloads/Spire-Office-JAVA.html
Spire.Doc for Java
问题修复:
- 修复了查找并高亮效果不正确的问题。
- 修复了 doc 保存成 docx 后,在 wps 中表格边框不显示的问题。
- 修复了 Word 转 PDF 时,程序抛 "IllegalArgumentException" 的问题。
- 修复了表格的边框属性改变的问题。
- 修复了 Word 转 Html 后,表格列宽度不一致的问题。
- 修复了 Word 转 PDF 时,程序抛 "Unexpected table container" 错误的问题。
- 修复了 Word 转 Html,布局不一致的问题。
- 修复了 RTF 转 PDF,图片丢失的问题。
- 修复了接受修订效果不正确的问题。
- 修复了加载 Word 时,程序抛 "The string contains invalid characters" 错误的问题。
- 修复了添加 Latex 公式效果不正确的问题。
- 修复了 Word 转 PDF,部分内容布局不正确的问题。
- 修复了 Word 转 PDF,无法重定向书签的问题。
- 修复了 Word 转 PDF,程序抛 "IllegalStateException" 错误的问题。
- 优化了 Word 中添加图片耗时的问题。
- 修复了对比文档,程序抛 "NullPointerException" 错误的问题。
- 修复了加载文档,程序抛 "ClassCastException" 错误的问题。
- 修复了对比文档,程序抛 "IllegalArgumentException" 错误的问题。
- 修复了对限制编辑的文档多次操作后,权限保护丢失的问题。
- 修复了 rtf 转 pdf,程序抛 "Can't create formfield with 'Check1' name" 错误的问题。
- 修复了使用 updateTableOfContents(),程序抛 "Index is less than 0 or more than or equal to the list count" 错误的问题。
- 修复了公式对比效果不正确的问题。
Spire.XLS for Java
问题修复:
- 修复了转换 XLSX 到 XLSB 时,程序抛 "Specified argument was out of the range of valid values" 错误的问题。
- 修复了 Worksheet.autoFitColumn 效果不正确的问题。
- 修复了 Excel 转 PDF,内容丢失的问题。
- 修复了一些 Excel 文档保存后字体大小不一致的问题。
Spire.PDF for Java
新功能:
- 使用 ChromeHtmlConverter 转换 HTML 时,支持将 HTML 字符串转换为 PDF。
- 使用 ChromeHTMLConverter 转换 HTML 到 PDF 时,支持开启“背景图形”。
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath);
URI uri = new URI(converter.getUrl());
IWebSocketService webSocketService = (IWebSocketService) WebSocketServiceImpl.create(uri);
converter.setWebSocketService(webSocketService);
String htmlString = "<html><body><p style=\' color:black \'>E-iceblue</p></body></html>";
converter.convertToPdf(htmlString, OutputPath, null);
ChromeHtmlConverter converter = new ChromeHtmlConverter(TestUtil.ChromiumPath);
URI uri = new URI(converter.getUrl());
IWebSocketService webSocketService = (IWebSocketService) WebSocketServiceImpl.create(uri);
converter.setWebSocketService(webSocketService);
ConvertOptions options = new ConvertOptions();
options.setTimeout(10 * 1000);
options.setPageSettings(new PageSettings(PaperFormat.A4));
options.getPageSettings().setMarginTop(0);
options.getPageSettings().setMarginBottom(0);
options.getPageSettings().setMarginLeft(0);
options.getPageSettings().setMarginRight(0);
options.getPageSettings().setPrintBackground(true);
converter.convertToPdf(url, OutputPath, options);
问题修复:
- 修复了 PDF 转换为 PDFA2A 时,内容丢失的问题。
- 修复了 SVG 转换为 PDF 时,内容重叠的问题。
- 修复了合并文档,程序抛 "Value cannot be null" 错误的问题。
- 修复了 PDF 转换为 OFD 时,附件丢失的问题。
Spire.Presentation for Java
问题修复:
- 优化了 PowerPoint 转换为图像时的清晰度。
- 修复了使用 ISmartArtNode.getTextFrame().getTextLocation() 程序抛 "ClassCastException" 错误的问题。
- 修复了 PowerPoint 转换为图像时,内容布局不正确的问题。
- 修复了使用 GroupShape.setTop() 效果不正确的问题。