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

Free Support Forum - aspose.com

Issues with insertImage in Java 2.0 evaluation version

I modified the DocumentBuilderDemo and added this call:

Shape mShape = builder.insertImage(getDocPath() + "Aspose.gif");

which brings back this error:

Exception in thread main
java.lang.AssertionError: Stream with not supported image type: UNKNOWN

at java.lang.AssertionError.(AssertionError.java:57)

at com.aspose.words.ImageData.a(Unknown Source)

at com.aspose.words.DocumentBuilder.a(Unknown Source)

at com.aspose.words.DocumentBuilder.insertImage(Unknown Source)

at com.aspose.words.demos.DocumentBuilderDemo.execute(DocumentBuilderDemo.java:40)

at com.aspose.words.demos.DocumentBuilderDemo.main(DocumentBuilderDemo.java:154)

Any idea what I am doing wrong?

Thank you for reporting this problem to us.

Please make sure that getDocPath() + "Aspose.gif" forms a valid path and Aspose.gif is a valid GIF image.

Best regards,