Free Support Forum -

Aspose.Imaging for Java 19.7 returns error when convert emf to png

Below code comes from Aspose.Imaging example project, and works well on Java 20.8, while returns error on Java 19.7

EmfImage image = (EmfImage)Image.load("/mnt/c/Project/Aspose/emf/test.emf");"/mnt/c/Project/Aspose/emf/output/test.png", new PngOptions());

It returns below error:

Exception in thread “main” class com.aspose.imaging.coreexceptions.ImageSaveException: Image export failed. —> class com.aspose.imaging.internal.Exceptions.ArgumentException: Cannot save to the specified format as it is not supported at the moment Please sure that PngOptions.VectorRasterizationOptions is correct.

Is the API pattern different between the two versions? How can I use it against Java 19.7? I only have license for this version, cannot use newer versions. My OS is Ubuntu 18.04 LTS.


Please try using latest Aspose.Imaging for Java 20.10 on your end and in case the issue persist, please share the source EMF file reproducing the issue on your end.

I tried Java 20.9, it’s no problem. While I can only use Java 19.7 because of my license limited me can only use versions no later than 19.7. But there’s the fault on Java 19.7.
Do you mean Java 19.7 is not available for emf->png conversion?


Actually, if issue is not reproduced in latest version, we may it consider that as an issue. Since, it’s working with latest version on your end, therefore I request you to please avail the subscription of API for latest version.