Hi,
after upgrading to Aspose.Words fpr Java 10.0.1 (we were using the beta version before), we noticed that the raster export for metafiles still doesn’t work when saving a Document using the HtmlSaveOptions.
Sample code (sample document containing EMF and WMF images is attached):
File wordFile = new File(System.getProperty("user.home") + "/desktop/EMF+WMF Graphics Test.docx");
Document doc = new Document(wordFile.getAbsolutePath());
HtmlSaveOptions saveOptions = new HtmlSaveOptions();
saveOptions.setExportMetafileAsRaster(true);
File converted = new File(wordFile.getParentFile(), "converted.html");
doc.save(converted.getAbsolutePath(), saveOptions);
The images (converted.001.png and converted.002.png) are empty (all pixels transparent), so the raster export obviously doesn’t work. When attempting to keep them as metafiles ( saveOptions.setExportMetafileAsRaster(true);), we get the same result: two empty png raster files.
In the beta version of Aspose.Words for Java, the non-raster export was also buggy (it exported the correct metafiles, but gave them a wrong file ending (.png)), but the final version doesn’t even write the metafile content.
The missing metafile export is a big issue for us and our clients, as we can’t even use the workaround with adding an ImageSaveingCallback and then converting the meta files, as Java (contrary to .Net) doesn’t provide metafile rendering capabilities.
Can you please address this issue in one of the next bugfixing patches?
Many thanks,
Peter Walser | Software Architect | Abraxas Juris AG