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

Free Support Forum - aspose.com

Exception is thrown while inserting SVG

Hi,
We too are facing SVG rendering issue while DocumentBuilder.insertImage(byte[] imageDataArray).
I have update Aspose.words to 18.2 but still facing the same issue.
Find the attached SVG data which i converted to byte array and passed to insertImage() of Document builder.

Getting the below error:-
Caused by: java.lang.IllegalArgumentException: Parameter is not valid. FileFormat=0
at asposewobfuscated.zzYD.(Unknown Source)
at asposewobfuscated.zzYD.(Unknown Source)
at com.aspose.words.zzZOA.zzZk(Unknown Source)
at com.aspose.words.zzZOA.zzn(Unknown Source)
at com.aspose.words.zzZOA.setImageBytes(Unknown Source)
at com.aspose.words.ImageData.setImageBytes(Unknown Source)
at com.aspose.words.DocumentBuilder.insertImage(Unknown Source)
at com.aspose.words.DocumentBuilder.insertImage(Unknown Source)
at com.aspose.words.DocumentBuilder.insertImage(Unknown Source)

svgData.zip (2.9 KB)

@sivanakshay

Thanks for your inquiry. Please create a simple Java application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing. Thanks for your cooperation.