Base64 images from xml datasource in Products Posted July 25, 2014 For a purely static image (repeated throughout the report on say the title and page headers)I declared a variable of type String and set it to the Base64 encoded image data.I added the commons-codec-1.9.jar to the project's build path as an external jar.Then for the image Expression - I set it to new ByteArrayInputStream(new org.apache.commons.codec.binary.Base64().decodeBase64($V{ImageVariable}.getBytes("UTF-8")))Note that I had to fully qualify the apache commons Base64 class.I set the evaluation time to 'Report' and 'Using Cache' to true.
Base64 images from xml datasource
in Products
Posted
For a purely static image (repeated throughout the report on say the title and page headers)
I declared a variable of type String and set it to the Base64 encoded image data.
I added the commons-codec-1.9.jar to the project's build path as an external jar.
Then for the image Expression - I set it to
new ByteArrayInputStream(new org.apache.commons.codec.binary.Base64().decodeBase64($V{ImageVariable}.getBytes("UTF-8")))
Note that I had to fully qualify the apache commons Base64 class.
I set the evaluation time to 'Report' and 'Using Cache' to true.