We were able to observe the issue and have logged it as NOTEJAVA-434 for further investigations at our end. We’ll update you here once there is some information or a fix version available in this regard.
private String getContent(Document document) {
int count=0;
HtmlSaveOptions options = new HtmlSaveOptions();
options.setExportCss(ResourceExportType.ExportEmbedded);
options.setExportImages(ResourceExportType.ExportEmbedded);
options.setExportFonts(ResourceExportType.ExportEmbedded);
options.setPageIndex(count++);
options.setPageCount(1);
options.setDocumentPerPageGeneration(true);
options.setCssPerPageGeneration(true);
options.setFontFaceTypes(FontFaceType.Woff);
OutputStream opstream = new ByteArrayOutputStream();
try {
document.save(opstream, options);
} catch (IOException e) {
log.error(“IOException occur while converting the content into outputStream for document {}”, document.getGuid());
throw new AsposeProcessException(“failed parse the content into outputStream”, e);
} catch (Exception e) {
log.error(“Unknown Exception occur while converting the content into outputStream for document {}”, document.getGuid());
throw new AsposeProcessException(“failed to get content”, e);
}
return opstream.toString();
}
This is to inform you that we are going to release Aspose.Note for Java 19.7 (it will be published tomorrow). In this release, you can read sample file without problems and save it to pdf/html.
Please note, saving to one format is still not resolved.
We have published the Aspose.Note for Java v19.7, so might want to try it to test reading the sample file or to convert to PDF/HTML file format via Aspose.Note for Java v19.7: