word转换后目录出现问题.zip (105.7 KB)
代码:
cument = 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);
请使用如下所示的 SaveOptions.UpdateFields 属性来避免此问题。
Document doc = new Document(MyDir + "word+¬++¦=-+-+¦÷-++-¦G.doc");
HtmlFixedSaveOptions options = new HtmlFixedSaveOptions();
options.setUseTargetMachineFonts(false);
options.setUseHighQualityRendering(true);
options.setEncoding(Charset.forName("UTF-8"));
options.setExportEmbeddedFonts(true);
options.setShowPageBorder(true);
doc.acceptAllRevisions();
options.setUpdateFields(false);
doc.save(MyDir + "out\\21.7.java.html",options);