Spire.Doc for Java 13.10.6 现已正式发布。该版本获取样式更改修订,接受或拒绝部分修订,以及针对样式进行修订跟踪记录。同时,一些在转换 Word 到 PDF,加载和保存 Word 文档时出现的问题也已成功被修复。更多详情如下。
新功能:
- 支持接受或拒绝部分修订。
Document document = new Document();
document.loadFromFile(inputFile);
RevisionInfoCollection revisionInfoCollection= document.getRevisionInfos();
for (int i = 0; i
- 支持获取样式更改修订。
Document document = ConvertUtil.GetNewEngineDocument();
document.loadFromFile(inputFile);
RevisionInfoCollection revisionInfoCollection= document.getRevisionInfos();
for (RevisionInfo revisionInfo : (java.lang.Iterable)revisionInfoCollection) {
if(revisionInfo.getRevisionType()==RevisionType.Format_Change){
if(revisionInfo.getOwnerObject() instanceof TextRange){
TextRange range = (TextRange)revisionInfo.getOwnerObject();
TestUtil.writeAllText(outputFile,"TextRange:"+range.getText()+"\r\n");
document.setRevisionsView(RevisionsView.Original);
TestUtil.writeAllText(outputFile,"Original bold:"+range.getCharacterFormat().getBold()+"\r\n");
document.setRevisionsView(RevisionsView.Final);
TestUtil.writeAllText(outputFile,"Final bold:"+range.getCharacterFormat().getBold()+"\r\n");
}
}
}
document.close();
- 支持针对样式进行修订跟踪记录。
Document document = new Document();
document.loadFromFile("test.docx");
document.startTrackRevisions("e-iceblue");
for (int i=0; i
- 支持设置文档网格每行字符数。
sec.getPageSetup().setGridType(GridPitchType.Chars_And_Line);
sec.getPageSetup().setCharactersPerLine(30);
问题修复:
- 修复了接受修订效果不正确的问题。
- 修复了 Word 转 PDF 效果不正确的问题。
- 修复了不调用 AcceptChanges(),获取不到高亮颜色的问题。
- 修复了设置表格样式报错的问题。
- 修复了更新目录不正确的问题。
- 修复了 HTML 转 Word 效果不正确的问题。
- 修复了转换 MHT 文件到 docx 乱码的问题。
- 修复了加载文档抛异常“IllegalArgumentException”的问题。
- 修复了加载文档抛“NullPointerException”的问题。
- 修复了移除内容控件效果不正确的问题。
- 修复了获取书签为空的问题。
- 修复了选中的复选框选中失败的问题。
- 修复了接受修订后,可编辑区域不能编辑的问题。
- 修复了保存文档到 wps 格式,图片内容丢失的问题。
- 修复了使用 useHarfBuzzTextShaper(true) 时,Word 转 PDF 抛出异常的问题。
- 修复了使用 replaceBookmarkContent 抛异常 “NullPointerException”的问题。
- 修复了 替换效果不正确的问题。
- 修复了 StructureDocumentTagCell.removeSelfOnly,程序抛异常 “Cannot remove because there is no parent.”的问题。
获取 Spire.Doc for Java 13.10.6 请点击:







