title: Jasper report spring boot app does not load base64 image
body: <p>my spring boot application uses jasper report to view the report below, but it does not load me a base64 image in the report, how can I solve? the parameters is LogoBase64</p>
  <p><strong>Spring Boot Java App:</strong></p>
  <pre><code>Preventivo ptemp = p;
          try {
              List&lt;TableReportPreventivo&gt; tablevaluesList = new ArrayList&lt;&gt;();
              //Recupero valori setup reporty
              //boolean ris = Support.decodeBase64JPG(repoAzienda.getInfo().getLogo()) == false ? false : true;
              ptemp = repoPreventivo.getInfo(p.getIdPreventivo());
              p = ptemp;
              Cliente c = repoCliente.getOne(ptemp.getIdCliente());
              String base64image = &quot;data:image/jpeg;base64,&quot; + repoAzienda.getInfo().getLogo();
              //Carico le informazioni del preventivo del Preventivo
              Date dt = ptemp.getDataInserimento();
              Date dat = java.sql.Date.valueOf(String.valueOf(dt));
              Calendar cal = Calendar.getInstance();
              cal.setTime(dat);
              TableReportPreventivo tablevalues = new TableReportPreventivo(dt.toString(), ptemp.getIdPreventivo() + &quot;/&quot; + cal.get(Calendar.YEAR), ptemp.getRiferimentoInterno(), ptemp.getVostroRiferimento(), c.getTitolo(), c.getRagioneSociale(), c.getIndirizzo(), c.getCap() + &quot; &quot; + c.getCitta() + &quot; &quot; + c.getProvincia(), ptemp.getOggetto(), ptemp.getTestata(), &quot;&quot;);
              ClassPathResource reportResource = new ClassPathResource(&quot;templates/reportpreventivo.jasper&quot;);
              Map&lt;String, Object&gt; reportParameters = new HashMap&lt;&gt;();
              tablevaluesList.add(tablevalues);
              JRBeanCollectionDataSource itemsJRBean = new JRBeanCollectionDataSource(tablevaluesList);
              reportParameters.put(&quot;Data&quot;, ptemp.getDataInserimento().toString());
              reportParameters.put(&quot;NRPreventivo&quot;, ptemp.getIdPreventivo() + &quot;/&quot; + cal.get(Calendar.YEAR));
              reportParameters.put(&quot;NSRif&quot;, ptemp.getRiferimentoInterno());
              reportParameters.put(&quot;VSRif&quot;, ptemp.getVostroRiferimento());
              reportParameters.put(&quot;Titolo&quot;, c.getTitolo());
              reportParameters.put(&quot;RagioneSociale&quot;, c.getRagioneSociale());
              reportParameters.put(&quot;Indirizzo&quot;, c.getIndirizzo());
              reportParameters.put(&quot;Citta&quot;, c.getCitta());
              reportParameters.put(&quot;Testata&quot;, p.getTestata());
              reportParameters.put(&quot;Oggetto&quot;, p.getOggetto());
              reportParameters.put(&quot;LogoBase64&quot;, base64image);
              ReportService.exportReportToPDF(reportResource.getInputStream(), reportParameters, &quot;report&quot;);
              if (rp.name().equals(&quot;STAMPAPREVENTIVOCOMPLETO&quot;)) {
                  System.out.println(&quot;Stampa preventivo completo&quot;);
              } else {
                  System.out.println(&quot;NO è Stampa preventivo completo&quot;);
              }
  
          } catch (Exception ex) {
              System.out.println(&quot;Errore: &quot; + ex);
  
          }
          return ptemp;
  </code></pre>
  <p><strong>Jasper jrxml:</strong></p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;!-- Created with Jaspersoft Studio version 6.17.0.final using JasperReports Library version 6.17.0-6d93193241dd8cc42629e188b94f9e0bc5722efd  --&gt;
  &lt;jasperReport xmlns=&quot;http://jasperreports.sourceforge.net/jasperreports&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd&quot; name=&quot;reportpreventivo&quot; pageWidth=&quot;595&quot; pageHeight=&quot;842&quot; columnWidth=&quot;555&quot; leftMargin=&quot;20&quot; rightMargin=&quot;20&quot; topMargin=&quot;20&quot; bottomMargin=&quot;20&quot; uuid=&quot;3c08ffac-5031-449c-a58f-007dffeebf2f&quot;&gt;
      &lt;import value=&quot;org.apache.commons.codec.binary.Base64&quot;/&gt;
      &lt;subDataset name=&quot;DataSetHeader&quot; uuid=&quot;db6131ae-8b7b-429e-aaca-42479bc8befd&quot;&gt;
          &lt;parameter name=&quot;Data&quot; class=&quot;java.lang.String&quot;&gt;
              &lt;parameterDescription&gt;&lt;![CDATA[Data del preventivo]]&gt;&lt;/parameterDescription&gt;
          &lt;/parameter&gt;
          &lt;parameter name=&quot;NRPreventivo&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;parameter name=&quot;NSRif&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;parameter name=&quot;Titolo&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;parameter name=&quot;RagioneSociale&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;parameter name=&quot;Oggetto&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;parameter name=&quot;Testata&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;parameter name=&quot;LogoBase64&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;queryString&gt;
              &lt;![CDATA[]]&gt;
          &lt;/queryString&gt;
          &lt;field name=&quot;Data&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;NSRif&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;VSRif&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;NRPreventivo&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;Titolo&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;RagioneSociale&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;Testata&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;Oggetto&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;field name=&quot;LogoBase64&quot; class=&quot;java.lang.String&quot;/&gt;
          &lt;variable name=&quot;Logo&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;/subDataset&gt;
      &lt;parameter name=&quot;Data&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;NRPreventivo&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;NSRif&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;VSRif&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;Titolo&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;RagioneSociale&quot; class=&quot;java.lang.String&quot;&gt;
          &lt;parameterDescription&gt;&lt;![CDATA[]]&gt;&lt;/parameterDescription&gt;
      &lt;/parameter&gt;
      &lt;parameter name=&quot;Indirizzo&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;Citta&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;Oggetto&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;Testata&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;parameter name=&quot;LogoBase64&quot; class=&quot;java.lang.String&quot;/&gt;
      &lt;queryString&gt;
          &lt;![CDATA[]]&gt;
      &lt;/queryString&gt;
      &lt;background&gt;
          &lt;band splitType=&quot;Stretch&quot;/&gt;
      &lt;/background&gt;
      &lt;title&gt;
          &lt;band height=&quot;79&quot; splitType=&quot;Stretch&quot;&gt;
              &lt;image scaleImage=&quot;FillFrame&quot;&gt;
                  &lt;reportElement positionType=&quot;Float&quot; stretchType=&quot;RelativeToTallestObject&quot; x=&quot;0&quot; y=&quot;0&quot; width=&quot;560&quot; height=&quot;79&quot; uuid=&quot;7fe6f2e0-3ba7-4424-9383-8d78bfe1cc21&quot;/&gt;
                  &lt;imageExpression&gt;&lt;![CDATA[$P{LogoBase64}]]&gt;&lt;/imageExpression&gt;
              &lt;/image&gt;
          &lt;/band&gt;
      &lt;/title&gt;
      &lt;columnHeader&gt;
          &lt;band height=&quot;430&quot; splitType=&quot;Stretch&quot;&gt;
              &lt;staticText&gt;
                  &lt;reportElement x=&quot;50&quot; y=&quot;15&quot; width=&quot;40&quot; height=&quot;30&quot; uuid=&quot;801816f2-1988-4b9e-9291-88d5a200d238&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Data:]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;90&quot; y=&quot;15&quot; width=&quot;100&quot; height=&quot;30&quot; uuid=&quot;29f6924b-5bd2-42f1-bd98-0090aed0d3eb&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{Data}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x=&quot;50&quot; y=&quot;50&quot; width=&quot;90&quot; height=&quot;30&quot; uuid=&quot;c59e786f-e907-4bcd-93f3-a14d0b777d5c&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Nr Preventivo:]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;140&quot; y=&quot;50&quot; width=&quot;100&quot; height=&quot;30&quot; uuid=&quot;b0632e23-c54a-4edc-a264-23055af446a5&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{NRPreventivo}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x=&quot;50&quot; y=&quot;80&quot; width=&quot;90&quot; height=&quot;30&quot; uuid=&quot;c5dbd3b3-7263-43d5-a804-1a797635fe8a&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Nf.Rif:]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;140&quot; y=&quot;80&quot; width=&quot;100&quot; height=&quot;30&quot; uuid=&quot;1a11a6cc-5d1b-4994-bf10-3cc1de504d07&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{NSRif}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x=&quot;50&quot; y=&quot;110&quot; width=&quot;90&quot; height=&quot;30&quot; uuid=&quot;dc708ab1-3286-479d-ad0b-aaea351652b4&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Vs.Rif:]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;140&quot; y=&quot;110&quot; width=&quot;100&quot; height=&quot;30&quot; uuid=&quot;aac1e4b6-da6a-4e46-aa0f-c026896a3b86&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{VSRif}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;380&quot; y=&quot;15&quot; width=&quot;100&quot; height=&quot;25&quot; uuid=&quot;7231c72c-d715-4bbe-8906-a27173f77220&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{Titolo}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;380&quot; y=&quot;50&quot; width=&quot;170&quot; height=&quot;30&quot; uuid=&quot;caf5fd23-70c3-46d3-9de0-c5765c1ec5fc&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{RagioneSociale}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;380&quot; y=&quot;80&quot; width=&quot;170&quot; height=&quot;30&quot; uuid=&quot;ec9b01f4-bcb2-495f-9a54-efc48bb452c8&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{Indirizzo}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;380&quot; y=&quot;110&quot; width=&quot;170&quot; height=&quot;30&quot; uuid=&quot;9174f886-5c23-4f99-9c97-86fb50f6eeb3&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{Citta}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;50&quot; y=&quot;180&quot; width=&quot;500&quot; height=&quot;30&quot; uuid=&quot;089a3b80-f7df-461b-be75-bcad575bf4e9&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{Oggetto}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;50&quot; y=&quot;220&quot; width=&quot;500&quot; height=&quot;210&quot; uuid=&quot;a5a724e9-c81f-470a-8a83-9dd6bfbd823d&quot;/&gt;
                  &lt;textElement&gt;
                      &lt;font size=&quot;12&quot;/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$P{Testata}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/columnHeader&gt;
      &lt;detail&gt;
          &lt;band height=&quot;125&quot; splitType=&quot;Stretch&quot;/&gt;
      &lt;/detail&gt;
      &lt;columnFooter&gt;
          &lt;band height=&quot;45&quot; splitType=&quot;Stretch&quot;/&gt;
      &lt;/columnFooter&gt;
      &lt;pageFooter&gt;
          &lt;band height=&quot;69&quot; splitType=&quot;Stretch&quot;&gt;
              &lt;textField&gt;
                  &lt;reportElement x=&quot;470&quot; y=&quot;30&quot; width=&quot;100&quot; height=&quot;30&quot; uuid=&quot;980219d2-fe09-46a6-ad45-44b5a5d955dd&quot;/&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA[$V{PAGE_NUMBER}]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
          &lt;/band&gt;
      &lt;/pageFooter&gt;
      &lt;summary&gt;
          &lt;band height=&quot;42&quot; splitType=&quot;Stretch&quot;/&gt;
      &lt;/summary&gt;
  &lt;/jasperReport&gt;
  </code></pre>