Hello,
I’m using AsposeWords to convert doc and docx documents to HTML format.
In most cases I want not to convert images but still use their original url so I configured the HtmlSaveOptions that way:
HtmlSaveOptions htmlOptions = new HtmlSaveOptions();
htmlOptions.setSaveFormat(SaveFormat.HTML);
htmlOptions.setExportImagesAsBase64(false);
htmlOptions.setExportFontsAsBase64(false);
htmlOptions.setExportFontResources(false);
htmlOptions.setExportOriginalUrlForLinkedImages(true);
htmlOptions.setImagesFolder("/some/tmp/folder"); // required else there is an error in Aspose
ByteArrayOutputStream out = new ByteArrayOutputStream();
doc.save(out, htmlOptions);
return out.toString(UTF_8);
If the document references for instance an image on wikipedia it properly outputs an HTML <img>
with the src being the URL of that image.
It has worked fine for a few years but with Aspose 23.10 the src is the path of the image in the local image folder.
It looks like the call to setExportOriginalUrlForLinkedImages is no longer working. Is there a workaround?