agiupponi Posted October 9, 2006 Share Posted October 9, 2006 I've a big problem with justified text field. With the same template, the report appeared correctly justified in pdf rendering, but in rtf the entire paragraph, including the last line, was justified. This is not correct, because the last line, ending with nr, must be left align.... Are there a solution or is a bug? Thanks in advance,Alessandro Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 11, 2006 Share Posted October 11, 2006 Hi, We have a justified text field at the end of the report in the /demo/samples/jasper sample provided.It seem that one is working.Can you confirm it works also in your environment? Thank you,Teodor Link to comment Share on other sites More sharing options...
Rafal.Kaluzinski Posted June 4, 2013 Share Posted June 4, 2013 4.5.1 Problem is in net.sf.jasperreports.engine.export.JRRtfExporter fix: \line to \par => Shift+Enter to Enter private String handleUnicodeText(String sourceText) { StringBuffer unicodeText = new StringBuffer(); for (int i = 0; i < sourceText.length(); i++) { long ch = sourceText.charAt(i); if (ch > 127) { unicodeText.append("\u" + ch + '?'); } else if (ch == 'n') { // fix: \line to \par unicodeText.append("\par "); } else if ((ch == '\') || (ch == '{') || (ch == '}')) { unicodeText.append('\').append((char) ch); } else { unicodeText.append((char) ch); } } return unicodeText.toString(); } 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