Jump to content
Changes to the Jaspersoft community edition download ×

JasperStudio 6 Base64 image


jim_jones2000
Go to solution Solved by ernestoo,

Recommended Posts

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

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 years later...
  • 1 month later...

 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 PDF
net.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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...