文档属性标题设置为了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);
请尝试使用以下代码设置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
感 谢, 问 题 解 决 了 !