Hi,
We are in the process of evaluating Aspose.words for Java for our application, I am trying to read a .docx file and open it as an html. I am able to read the doc, edit the contents and display it as an Html file, except that images are not getting displayed.
when I use the servletpath to save the image, the images are getting saved in the temp folder and is shown on the Html file
OutputStream dstStream = new ByteArrayOutputStream();
doc.getSaveOptions().setHtmlExportXhtmlTransitional(true);
doc.getSaveOptions().setExportImagesFolder(config.getServletContext().getRealPath("/attachments"));
doc.getSaveOptions().setHtmlExportImagesFolderAlias("/attachment");
doc.save(dstStream, SaveFormat.HTML);
Where as when i create a temp folder in the system and try to use it, the images are getting saved but never displayed on the web page.
OutputStream dstStream = new ByteArrayOutputStream();
doc.getSaveOptions().setHtmlExportXhtmlTransitional(true);
doc.getSaveOptions().setExportImagesFolder("c:\temp\attachments");
doc.getSaveOptions().setHtmlExportImagesFolderAlias("/attachment");
doc.save(dstStream, SaveFormat.HTML);
Can you let me the difference between these options and what am I doing wrong in the second option.