word转换后第一页内容挤到一页了且有空白区域.zip (173.6 KB)
转换结果、原文件、转换前后对比图见附件。 使用Aspose.Words for Java 20.6版本。
转换代码如下:
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);