jim_jones2000 Posted January 25, 2015 Share Posted January 25, 2015 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. Link to comment Share on other sites More sharing options...
Solution ernestoo Posted January 26, 2015 Solution Share Posted January 26, 2015 You will need to import the the commons library: new ByteArrayInputStream(Base64.decodeBase64($F{Signature}.getBytes())) [/code] Link to comment Share on other sites More sharing options...
dcdacd Posted February 7, 2017 Share Posted February 7, 2017 Hi user, Could you resolve it? Could you show an example for running in my pc ? Thanks for all, Link to comment Share on other sites More sharing options...
edtegomez Posted March 21, 2017 Share Posted March 21, 2017 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: 2017-03-21 12:34:36,625 ERROR EngineServiceImpl,pool-5-thread-2:598 - Error while exporting report to PDFnet.sf.jasperreports.engine.JRException: java.io.IOException: Premature EOF while reading JPG. at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.processImageRetainShape(JRPdfExporter.java:1750) at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.process(JRPdfExporter.java:1607) at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.access$300(JRPdfExporter.java:1535) at net.sf.jasperreports.engine.export.JRPdfExporter.exportImage(JRPdfExporter.java:1475) at net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:1093) at net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:1056) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:920) at net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:537) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.exportToPdf(EngineServiceImpl.java:593) at com.jaspersoft.jasperserver.remote.exporters.PdfExporter.exportReport(PdfExporter.java:98) at com.jaspersoft.jasperserver.remote.services.impl.ReportExecutorImpl.exportReport(ReportExecutorImpl.java:178) at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.generateReportOutput(RunReportServiceImpl.java:572) at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl.executeExport(RunReportServiceImpl.java:479) at com.jaspersoft.jasperserver.remote.services.impl.RunReportServiceImpl$2.run(RunReportServiceImpl.java:379) at com.jaspersoft.jasperserver.api.logging.util.LoggableExecutorService$1.run(LoggableExecutorService.java:53) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)Caused by: java.io.IOException: Premature EOF while reading JPG. at com.lowagie.text.Jpeg.processParameters(Unknown Source) at com.lowagie.text.Jpeg.<init>(Unknown Source) at com.lowagie.text.Image.getInstance(Unknown Source) at net.sf.jasperreports.engine.export.JRPdfExporter$InternalImageProcessor.processImageRetainShape(JRPdfExporter.java:1745) ... 17 more Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now