Jump to content

How to calc textField size?


tinti

Recommended Posts

Well,

I have a report that prints some text from a database.
The field where the text is displayed, is scaled according to the text.
But this is done behind the scenes, by the JasperReports.

My text has multiple alignments, however, the JasperReports only takes into account the alignment of the field itself.
For example, if my text is centered lines, but the text field is set to right alignment with the entire text will be aligned right.

I have read here on the forum that behave this is normal, then i had to find a solution.
I'll modify the object JasperPrint and divide the field where the text appears in various fields.
I will create a new field for each block of text alignment, and then set the correct alignment for that particular block.

My problem is that I'm using html markup for the field, but when I get the text of JRTemplatePrintText, he returns the text in styledText.

How will I know the exact size of each new block of text?

Sorry for my English,
I'm using GoogleTranslator. >_<

Link to comment
Share on other sites

  • 7 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...