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

Free Support Forum - aspose.com

Document converting(image as base64 code) issue in IE

Hi,

There is an issue while converting the attached document to HTML. Looks like the base64 code for the images are not properly converted.

When we load the generated html in IE, most of the images are not properly loading.

Code snippet:

public static void convertDocument(File file, String format) throws FileNotFoundException{
    InputStream is = new FileInputStream(file);
    System.out.println("Converting to " + format);
    Document doc = null;
    try {
        doc = new Document(is);
        String filename = file.getName();
        filename = filename.substring(0, filename.lastIndexOf("."));
        DocumentBuilder docBuilder = new DocumentBuilder(doc);

        HtmlSaveOptions saveOptions = new HtmlSaveOptions(SaveFormat.HTML);
        saveOptions.setExportHeadersFootersMode(ExportHeadersFootersMode.NONE);
        saveOptions.setExportXhtmlTransitional(false);
        saveOptions.setExportImagesAsBase64(true);

        docBuilder.getDocument().save(BASE_DIR_PATH + filename + "." + format, saveOptions);
    } catch (Exception e) {
        e.printStackTrace();
    }
}

Please let me know if I am missing anything or this is an know issue

Many thanks
Ragu

Hi
Thanks for your request. Unfortunately, I cannot reproduce the problem on my side. I used the latest version of Aspose.Words for Java (10.5.0), IE 9.0.8112.16521, FireFox 7.0.1 and Chrome14.0.835.202.
Could you please attach your output HTML here? I will check it on my side and provide you more information.
Best regards,

Hi Alexey,

Thanks for the prompt reply. Attached is the generated html.

Please let me know if you need any further information’s.

Thanks
Ragu

Hello
Thank you for additional information. As I can see you are still using an old version of Aspose.Words (10.2.0). The latest version of Aspose.Words is 10.5.0; you can download this version from here:
https://releases.aspose.com/words/java
Could you please try using the latest version of Aspose.Words and let me know how it goes on your side.
Best regards,

Hi,

Thanks, I took the latest(10.5.0) jar and generated HTML from the same document is attached here.

Looks like still there is a problem with the IE 8.

Issue 1 : Images are broken in IE only
Issue 2 : Some PNG images are not rendering only.

Can you please paste your code snippet which you are using for the conversion.

Regards
Ragu

Hello
Thanks for your inquiry. I use the following code for testing:

Document doc = new Document("C:\\Temp\\2E01_2_Copy.docx");
doc.save("C:\\Temp\\out.html");

And the only difference I can see - the quality of PNG image is worsened upon HTML export.
I managed to reproduce this problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.
Please see the attached document produced on my side.
Best regards,

Hi,

Thanks, please let me know when it will be available for us to use.

Also we are planning to take the corporate licence for the aspose library, in this case, do we get premium support from your team.

Many thanks
Ragu

Hello
Thanks for your request. You will be notified of any developments regarding this problem.
All questions related to the licensing you can ask in Aspose.Purchuse forum:
https://forum.aspose.com/c/purchase/6
Best regards,