blaguman Posted April 17, 2009 Share Posted April 17, 2009 Hello !I'm facing a strange problem for several days...I have some text fields with the flag "stretch with overflow", and this feature works very good, my fields expand when the text has to be printed on more than one line.However, the problem is that I sometime have a blank line under some of these text fields. In fact, I have kind of a list of text fields ones under each others, and with a single lineSpacing between them.But for some fields in which the text is large, it seems that Jasper "reserve" a new line to write into, but when it's not necessary. So i'm wondering if it's because I use a styled texte, and so the original size of the string is larger than the actual one, ('cause of the <style ...="".....> tags etc..), what could disturb Jasper.Does someone have any idea of what I could do to prevent this line to be jumped for nothing ? Thank you very much :) Link to comment Share on other sites More sharing options...
blaguman Posted April 27, 2009 Author Share Posted April 27, 2009 OK, I found the solution ! I just had to put the same font in fontName and pdfFontName. Thank you anyway Link to comment Share on other sites More sharing options...
blaguman Posted June 4, 2009 Author Share Posted June 4, 2009 Hi everybody,hmm, I was wrong, the problem is not solved in every case.I still have some of my fields which leave a blank line under them, as they would need more place to print themselves. I join a screenshot so I'm sure you'll understand...In the example, the red frames show where a unnecessary blank space is placed. For instance, if I try to add some characters at the end of the first line, they're still printed on the same line, so there's enough space left, but this line shows anyway... Any clue...? Thank you very much Regards,MorganPost Edited by blaguman at 06/05/2009 07:32 Link to comment Share on other sites More sharing options...
blaguman Posted June 9, 2009 Author Share Posted June 9, 2009 Hi... I attach the jrxml file, just in case..Regards,Morgan Link to comment Share on other sites More sharing options...
lucianc Posted June 9, 2009 Share Posted June 9, 2009 In which output does the blank line show? Is it PDF, or the Java viewer (JRViewer) as well?If it's only in PDF, make sure that the Tigre* fonts are available in Java.Regards,Lucian Link to comment Share on other sites More sharing options...
blaguman Posted June 10, 2009 Author Share Posted June 10, 2009 Hello Lucian !ÔH YEAH it works !I thought about that yesterday and I just tried it.In fact, it's just I didn't understand the pdfFontName should represent an existing font on the JVM.I thought the key I gave to my FontMap was just an alias I could use from wherever I wanted. But when I tried to give the FontMap some keys whose name existed on the JVM, it started to work...Thank you, see you soon ! :) Regards,Morgan Link to comment Share on other sites More sharing options...
jonathan.hinton Posted August 30, 2018 Share Posted August 30, 2018 I also had a similar issue where a blank line would be displayed at the end of the text field. In this case, the problem seemed to be where we had used a font size of 9.5 (apparently Jasper cannot handle half font sizes: https://community.jaspersoft.com/questions/543292/are-half-point-font-sizes-possible). Im guessing Jasper was calculating the textfield size based on font size 10 but the pdf viewer was rendering the text at the correct size of 9.5... 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