anztenney Posted June 4, 2009 Share Posted June 4, 2009 During the last several months I've been playing around with iReports. I create the reports and test them on a Windows box and they are then deployed and tested on a Linux box. Most of the times I see no problems, but sometimes there are some small differences - nothing major up to this point.I'm struggling with a problem that I can't seem to work around now. Basically I have a cell that is overflowing with data and I have stretchWithOverflow set to true. However, in Linux, it seems to be cutting off some of the data sometimes - it's not consistent because sometimes the data overflows and it prints find and sometimes it doesnt.It works correctly everytime on Windows. Any suggestions or thoughts? Link to comment Share on other sites More sharing options...
anztenney Posted June 4, 2009 Author Share Posted June 4, 2009 We had the following text field expression: Code: For some reason, the last line "HD:"........ was not printing for some employees when the report was generated on a linux server. We tried a lot of hacks, but this is what we finally came up with: Code: For most of the employees, there is now an extra blank line, and for the ones where the HD was not printing, it is now printing, but they do not get an additional blank line. Anyone have any ideas as to why this may be happening on Linux and not on Windows?Post Edited by anztenney at 06/04/2009 19:36 Link to comment Share on other sites More sharing options...
Gaby38 Posted June 4, 2009 Share Posted June 4, 2009 I'm not a specialist of the subject, but it looks like it was a problem of line format. I don't know all the details, but I remember that the format of a text line is not the same in Linux and Windows : in a case it's a LF+CR and in the other case it's CR+LF or only LF.In particular, I'm obliged to use MFC Wordpad on Windows to see correctly linux text files and not Notepad.So for me it's not abnormal that a text file is displayed as you want on windows and not on linux if it has several lines. Perhaps is there a compatible format ?HTH Link to comment Share on other sites More sharing options...
anztenney Posted June 4, 2009 Author Share Posted June 4, 2009 Good thought, I tried this, but with the same resultsCode:$F{empName} + System.getProperty("line.separator") +"Emp. #: " + $F{empNumber} + System.getProperty("line.separator") +"HD: " + (new SimpleDateFormat("MM/dd/yyyy")).format($F{hireDate}) Link to comment Share on other sites More sharing options...
phantastes Posted June 4, 2009 Share Posted June 4, 2009 Have you made sure that the right fonts are installed on your linux box? I've come across a similar issue when everything is looking just fine on my developer windows machine and when the report is uploaded to the server (linux) certain fields get cut off. In my case it was because the right fonts were not installed on the server so a font was used that was "wider". I don't know if this is the case for you. Link to comment Share on other sites More sharing options...
alcoholic Posted August 20, 2009 Share Posted August 20, 2009 I am also facing the same issue.When testing on Windows the output PDF report is coming fine with proper spacing and complete text.But when the application is deployed onto Linux, the output pdf report has text being cut off in many fields( Overflow of Text Fields is a possibility, so I can not give a fixed size Text field).I am using Courier font. I've also tried to use the courier font(in pdffontname) from a different location than the system font directory so that on Linux also I have the same font with which the PDF is being generated. But still the results are different on Linux and on Windows.Can someone help me with the possible causes for this? Link to comment Share on other sites More sharing options...
hangman01 Posted August 20, 2009 Share Posted August 20, 2009 I have had similar issuses in the past when switching from a windows development environment to a linux or unix production environment. I have found that as long as the text area is defined large enough all the text prints correctly. I just make sure that my text fields have plenty of vertical space even if the appear to overlap other fields. Make sure that you have the text fields marked as transparent and use rectangles if borders are needed. 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