Hi. I am quite new to jasper studio. I searched the forum, studio help docs and googled - and was unable to find a trail I could follow. I have some base64 images that I want to show on a report. The html equivalent is <img src=""data:image/png;base64,iVBORw0KGgo.."">. I tried through the tool adding the image element and inputting the string in different ways but no luck. Don't mind editing the jrxml directly either if need be. Would appreciate any direction.
1 Answer:
Posted on January 26, 2015 at 4:30am
You will need to import the the commons library:
<import value="org.apache.commons.codec.binary.*"/> <image> <reportElement " x="52" y="33" width="204" height="71"/> <imageExpression><![CDATA[new ByteArrayInputStream(Base64.decodeBase64($F{Signature}.getBytes())) ]]></imageExpression> </image>
Hi user, Could you resolve it? Could you show an example for running in my pc ? Thanks for all,
6I had a report on an earlier version of Jasper, this report include image base64 jpg and it worked fine. I update the JasperServer and JasperSoft Studio versions and this report i can´t export to pdf. Note: With png (base64->"IVBOR") images works fine but jpg (base64->"/9J/4") images gives the following exception: