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)svgData.zip (2.9 KB)
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)
Thanks for your inquiry. Perhaps, you are not using the SVG string correctly in your code. 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.
Thanks for sharing the detail. You are facing this issue due to decodeBase64 method. Please use the following code snippet to insert SVG string into document.