Aspose.Words for Java word转html,文档属性标题设置为了title

文档属性标题设置为了title.zip (63.8 KB)
word的文档属性标题转换后设置给了html的标签,如何禁用呢?我不想把标题属性设置给title标签。期待,感谢!

转换代码如下:
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文件的标题:

Document doc = new Document("E:\\Temp\\206168\\in.doc");

doc.getBuiltInDocumentProperties().setTitle("Document's TITLE");

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\\206168\\awjava-19.11.html", options);
1 Like

感 谢, 问 题 解 决 了 !

@xiangma,

能够找到想要的东西真是太好了。 如果您以后有任何其他疑问,请随时告诉我们。