Posted By

wnasich on 12/14/11


Tagged

xml reports svg jasperreport


Versions (?)

Using svg images into JasperReport


 / Published in: XML
 

URL: http://stackoverflow.com/questions/4657238/jasperreport-scales-images-when-exporting-to-pdf-thus-losing-quality

Replace the normal <image...> XML with the following code (be sure to adjust the width and height accordingly):

  1. <image hAlign="Center" vAlign="Middle">
  2. <reportElement x="0" y="0" width="179" height="66"/>
  3. <imageExpression class="net.sf.jasperreports.engine.JRRenderable"><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("/path/to/logo.svg"))]]></imageExpression>
  4. </image>

Report this snippet  

You need to login to post a comment.