@yinke 请在保存document.getStyles().getDefaultFont().setLocaleId(2052)
之前添加以下代码,并检查结果。此外,MS Word 还根据 Windows 默认语言来分配语言。 您是否将中国语言作为 Windows 本地语言?
本地Windows默认语言是中文,添加您提供的代码后转换的pdf还是显示英文
LoadOptions loadOptions=new LoadOptions();
loadOptions.getLanguagePreferences().setDefaultEditingLanguage(EditingLanguage.CHINESE_PRC);
Document document = new Document(“比对0102.docx”,loadOptions);
document.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false);
document.getLayoutOptions().getRevisionOptions().setShowInBalloons(ShowInBalloons.FORMAT_AND_DELETE);
document.getStyles().getDefaultFont().setLocaleId(2052);
document.save(“比对0102.pdf”, SaveFormat.PDF);
@yinke 感谢您报告此问题。 我们已经在我们的内部问题跟踪系统中打开了以下新工单,并将根据 免费支持政策 中提到的条款提供它们的修复:
Issue ID(s): WORDSNET-27866
如果您需要优先支持以及直接联系我们的付费支持管理团队,您可以获得 付费支持服务 。
加上您提供的代码doc1.getLayoutOptions().getRevisionOptions().setShowInBalloons(ShowInBalloons.FORMAT_AND_DELETE);
后,由于页码比对有差异,转成pdf报错
Document doc1 = new Document("原文.docx");
Document doc2 = new Document("修改.docx");
CompareOptions options = new CompareOptions();
options.setGranularity(Granularity.CHAR_LEVEL);
options.setIgnoreFormatting(false);
options.setIgnoreCaseChanges(true);
options.setTarget(ComparisonTargetType.NEW);
doc1.getLayoutOptions().getRevisionOptions().setShowRevisionBars(false);
doc1.getLayoutOptions().getRevisionOptions().setShowInBalloons(ShowInBalloons.FORMAT_AND_DELETE);
doc1.compare(doc2, "Update", new Date(), options);
doc1.getStyles().getDefaultFont().setLocaleId(EditingLanguage.CHINESE_PRC);
doc1.save("比对.pdf", SaveFormat.PDF);
@yinke 感谢您报告此问题。 我们已经在我们的内部问题跟踪系统中打开了以下新工单,并将根据 免费支持政策 中提到的条款提供它们的修复:
Issue ID(s): WORDSNET-27871
如果您需要优先支持以及直接联系我们的付费支持管理团队,您可以获得 付费支持服务 。
The issues you have found earlier (filed as WORDSNET-27866,WORDSNET-27871) have been fixed in this Aspose.Words for Java 25.3 update.