word补充字体后转换结果的字体和原文件还是有差异.zip (2.1 MB)
转换结果、原文件、转换前后对比图、所需要的字体见附件。 使用Aspose.Words for Java 20.8版本。
转换代码如下:
Document document = new Document(sourceFileName);
HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();
options.setUseTargetMachineFonts(false);
options.setUseHighQualityRendering(true);
options.setEncoding(Charset.forName(“UTF-8”));
options.setExportEmbeddedFonts(true);
options.setShowPageBorder(true);
document.acceptAllRevisions();
document.save(targetFileName, options);