We are trying to convert RTFs to HTML using Aspose.Words for Java. We are currently using version 16.12 but results are the same with the latest versions we tried as well (21.6 and 21.7). The issue is RTF’s embedded images are coming out as “grey”, basically not converting. We use the base64 option for the image output.
This is out java code:
...
...
String fileName = item.getValueString().trim();
com.aspose.words.Document wordDocument = new com.aspose.words.Document(
document.getAttachment(fileName).getInputStream());
wordDocument.joinRunsWithSameFormatting();
HtmlSaveOptions saveOptions = new HtmlSaveOptions(
SaveFormat.HTML);
saveOptions.setExportImagesAsBase64(true);
ByteArrayOutputStream stream = new ByteArrayOutputStream();
wordDocument.save(stream, saveOptions);
wordDocument = null;
PrintWriter pw = this.getAgentOutput();
pw.println("Content-type: text/html");
pw.println(stream.toString("UTF-8"));
...
...
I am attaching a screenshot of the output and I can attach the RTF in a private area if need (and you provide instructions how to do it)
Feels like a bug in Aspose.Words API. Can you help?
Thanks
Screenshot 2021-08-03 105759.png (1.8 KB)