Hi,
Version 8.0.2 exposed ImageOptions:
Converting Workbook to Different Formats|Documentation
However,
when saving the file, the images from the worksheet are always exported
in the original format regardless of the configured ImageFormat.
Also,
when using setExportImagesAsBase64(true), the images are converted with
very low resolution, actually it seems to be resized to a fixed maximum
size then stretched on display (the IMG tag).
public static void testImageExport() throws Exception
{
InputStream v_inputStream = ClassLoader.getSystemResourceAsStream(“TemplateTeste.xlsx”);
Workbook v_workbook = new Workbook(v_inputStream);
v_inputStream.close();
HtmlSaveOptions v_saveOptions = new HtmlSaveOptions();
v_saveOptions.getImageOptions().setImageFormat(ImageFormat.getPng());
v_saveOptions.setEncoding(Encoding.getUTF8NoBOM());
v_saveOptions.setExportActiveWorksheetOnly(true);
v_workbook.save(“output/teste.html”, v_saveOptions);
v_saveOptions.setExportImagesAsBase64(true);
v_workbook.save(“output/teste_base64.html”, v_saveOptions);
}
Best regards,
Flávio
Hi,
Hi,
Hi,
I tested latest Firefox (30.0), IE (11.0.9600.17126), Chrome (35.0.1916.153), Thunderbird and Windows Live Mail.
Also, copying the BASE64 string from the HTML and decoding it confirms the problem (result from http://base64converter.com attached).
Also, notice that when using setExportImagesAsBase64(), the image is always converted to PNG (i.e. even if I remove the setImageFormat call).
Hi,
Hi,
Thanks for using Aspose.Cells.
Because IE Browser only supports 32k base64 image, when the size of base64 image is more than 32k, we will compress the base64 image, so that IE Browser can show the base64 image.
But other Browsers still use original base64 image.
Please download and try this fix: Aspose.Cells for Java 8.1.1.3.
Hi,
Confirmed all tests are working perfectly, thank you very much
Best regards,
Flávio
Hi Flávio,
The issues you have found earlier (filed as CELLSJAVA-40866) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.