bjarkekr Posted May 8, 2012 Share Posted May 8, 2012 Hi.. Its not clear anywhere, but is it possible to use SVG in an image type? I have a logo that I would like to print on top of labels and the path is fetched from the database. It works fine with PNG, GIF or JPG, but not SVG...?I have tried changing the "Expression Class" in I report to everything that is available with no luck.Hope somebody can help. Thanks Link to comment Share on other sites More sharing options...
Timbo2013 Posted September 11, 2013 Share Posted September 11, 2013 Hello bjarkekr,try this:<image scaleImage="RetainShape" hAlign="Center" vAlign="Middle"> <reportElement uuid="0eae3352-7e0c-40fe-a01a-1a3f72b030ac" x="0" y="37" width="195" height="38"/> <imageExpression><![CDATA[net.sf.jasperreports.renderers.BatikRenderer.getInstance(new java.io.File("path/to/the.svg"))]]></imageExpression></image>(tested with JasperReports v5.2.0 and iReport v5.1.0) Also see:http://community.jaspersoft.com/wiki/how-add-svg-image-your-report-jrxml 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