rimmeraj Posted December 15, 2011 Share Posted December 15, 2011 We are having a problem rendering a multi-line textField. We are filling the report on a Linux server and then rendering it on a Windows client. The problem is Jasper is taking our box size to be what the fill thought the size needed to be not what we defined in the report. The textField is configured to be non stretch. Thus on a 3 line textField under windows line 3 is dropped but works fine on MAC and Linux. It looks like the problem is in net.sf.jasperreports.engine.export.AbstractTextRenderer.private void renderParagraph( AttributedCharacterIterator allParagraphs, int lastParagraphStart, String lastParagraphText ) Line 531 if (drawPosY + lineHeight <= text.getTextHeight()) TextHeight is the calculated height by the fill. I think it should be text.getHeight() which is how big we declared the text element or max(text.getHeight(),text.getTextHeight()). Link to comment Share on other sites More sharing options...
fscherrer Posted July 4, 2014 Share Posted July 4, 2014 We have exactly the same issue here.It took a while to understand what was going on. We managed to export the JasperPrint via JasperExportManager.exportReportToXmlFile and load it on the client and then, tweeking the XML, we got to the textHeight attribute of the text element.And got here after searching for jasperreports textHeight windows 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