net.sf.jasperreports.engine.JRException: java.io.IOException: The byte array is not a recognized imageformat.
I am getting this error when I am running the jrxml
file that contain images in jasper. I have changed the version of the itext
also in pom.xml
file. but its still not working, Can anyone help me with this.
In my case, I was trying to fetch the image from the classpath
, and I was using the same object for creating two diff PDF by changing some values. I used FileInputStream
to read the image. This error occurred because we can't reuse InputStream
in Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With