Aspose.Words for Java word转html,转换后红线变粗

红头横线变粗.zip (255.4 KB)
转换结果、原文件、转换前后对比图见附件。 使用Aspose.Words for Java 20.1版本。
转换代码如下:
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);

@xiangma,

关于HTML固定格式的损坏版面,在使用Aspose.Words for Java的最新许可版本(即20.3)进行初步测试后,我们最终无法重现此问题。 我们使用以下简单代码最终生成了“ awjava-20.3.html”。 请参阅以下输入和输出文档:

Java Code:

Document doc = new Document("E:\\Temp\\209884\\input.docx");
HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();
options.setUseTargetMachineFonts(false);
options.setUseHighQualityRendering(true);
options.setEncoding(Charset.forName("UTF-8"));
options.setExportEmbeddedFonts(true);
options.setShowPageBorder(true);
doc.acceptAllRevisions();
doc.save("E:\\Temp\\209884\\awjava-20.3.html", options);

因此,请升级到最新版本,即20.3。 希望这可以帮助。

@xiangma,

关于将红色的“艺术字形状”转换为“ HTML固定”中的框的问题,我们最终设法重现了同样的问题。 为了更正,我们已将此问题记录在问题跟踪系统中。 此问题的ID为WORDSNET-20104。 我们将进一步调查该问题的详细信息,并让您及时了解更正的状态。 对于给您带来的不便,我们深表歉意。

The issues you have found earlier (filed as WORDSNET-20104) have been fixed in this Aspose.Words for .NET 20.5 update and this Aspose.Words for Java 20.5 update.

已验证,此问题已解决,感谢!