Jump to content
We've recently updated our Privacy Statement, available here ×

Blank line when overflow


blaguman

Recommended Posts

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

  • 2 weeks later...
  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

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,

Morgan



Post Edited by blaguman at 06/05/2009 07:32
Link to comment
Share on other sites

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

  • 9 years later...

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...