aspose word for java将word文档转为html后,着重号丢失
htmlSaveOptions设置如下:
private HtmlSaveOptions initHtmlSaveOptions() {
HtmlSaveOptions options = new HtmlSaveOptions(SaveFormat.HTML);
options.setEncoding(StandardCharsets.UTF_8);
options.setExportXhtmlTransitional(true);
options.setCssStyleSheetType(CssStyleSheetType.INLINE);
options.setPrettyFormat(true);
options.setUseAntiAliasing(true);
options.setImageResolution(300);
options.setUseHighQualityRendering(true);
options.setExportImagesAsBase64(exportImagesAsBase64);
options.setExportFontsAsBase64(true);
options.setScaleImageToShapeSize(true);
options.setExportOriginalUrlForLinkedImages(false);
if (useImagesFolderAlias && (imagesFolderAlias != null && !imagesFolderAlias.isEmpty())) {
String substring = remoteImagesFolder.substring(remoteImagesFolder.indexOf(nginxResourceFolderPrefix) + nginxResourceFolderPrefix.length());
options.setImagesFolderAlias(imagesFolderAlias + substring);
}
if (imagesFolder != null && !imagesFolder.isEmpty()) {
options.setImagesFolder(imagesFolder);
options.setResourceFolder(imagesFolder);
}
options.setOfficeMathOutputMode(htmlOfficeMathOutputMode == null ? HtmlOfficeMathOutputMode.IMAGE : htmlOfficeMathOutputMode);
return options;
}
签订.docx (10.0 KB)