We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

HtmlSaveOptions.setExportImagesAsBase64

Starting with a redlined rtf document that includes ole objects.

String rtfPath = "c:\temp\document.rtf";
String htmlPath = "c:\temp\document.html";
HtmlSaveOptions hso = new HtmlSaveOptions();
hso.setPrettyFormat(true);
hso.setAllowNegativeLeftIndent(false);
hso.setEncoding("UTF-8");
hso.setExportImagesAsBase64(true);
Document document = new Document(rtfPath);
document.save(htmlPath,hso);

When running with the code above, html is generated that gives a string similar to the following: "shall be designed for all thermal environments as determined from an i ntegrated t hermal a nalysis performed using"

The html source confirms that each section that is separated by a lack of underscore (a space) is seen as a separate . When I set hso.setExportImagesAsBase64(false), the sentence is correctly seen as a single insert, and the words in not split incorrectly (notice how "i ntegrated" is split).

Here's a snippit of the incorrect generated html source:
shall be designed for all thermal environments as
determined from an
i
ntegrated
t
hermal

For simplicity, I said that I was saving the html to a file. I’m not. I’m saving it to a ByteArrayOutputStream

It doesn’t look like it’s the bytearrayoutputstream or the base64 images. I think I’ve narrowed it down to “hso.setPrettyFormat(true);”

Hi Matthew,


Thanks for your inquiry and sorry for the delayed response.

Could you please attach your input RTF document along with the output HTML file here for testing? I will investigate the issue on my side and provide you more information.

Best Regards,