Using svg images into JasperReport


/ Published in: XML
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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>

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.