vahid Posted August 2, 2008 Share Posted August 2, 2008 Hi,I've a report in Persian language (Persian is Right to Left language). My application is web based. Besides some text in Persian I have a chart in the report. The chart is created by using JFreeChart. The text and the chart are passed to the report as parameters. Later the report is exported to PDF.All the texts in the in the report are correct and readable (All the texts are in Persian). The problem is the text in the chart. Chart's legend and bar labels are rendered in Persian but all the text in chart and ONLY chart are the other way around e.g. (table is elbat - In the example I've used English just to clarify the issue. Actual problem is in Persian.) I changed the chart text to English and everything was quite ok. The problem is RIGHT TO LEFT languages.I've done some digging in the forum and came upon a thread pinpointing same issue in Hebrew language which is also Right to Left but I could not conclude a solution out of it.Further information:I'm wrapping JFreeChart in JCommonDrawableRendere before passing it to the exporter.AndUsing JRRenderable class in <imageExpression> to show the chart.Please, if anyone could help meRegards Link to comment Share on other sites More sharing options...
lucianc Posted August 5, 2008 Share Posted August 5, 2008 This seems to be a limitation of iText's PDFGraphics2D, which doesn't support RTL or Bidi texts.One workaournd is to render the chart to a BufferedImage, and use a plain image renderer to display the chart. The problem with this is that the chart will be displayed as a rasterized image, and not rendered as a SVG. A solution to this is to go through a Batik SVG, as net.sf.jasperreports.charts.util.SvgChartRendererFactory does.Regards,Lucian Link to comment Share on other sites More sharing options...
wael.aburahmeh Posted March 14, 2013 Share Posted March 14, 2013 I have same issue with arabic font rtl direction.solution is to set chart property render type to image in ireport.then everything is ok Link to comment Share on other sites More sharing options...
kiswanij Posted September 24, 2016 Share Posted September 24, 2016 Thanks wael.aburahmeh !! , you saved our day. Link to comment Share on other sites More sharing options...
devomare Posted December 21, 2021 Share Posted December 21, 2021 I have same issue with arabic font rtl direction.solution is to set chart property render type to SVG in jaspersoft. then everything is ok without lose resolution 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