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

Incorrect wrapping of text at end of page


gjritter

Recommended Posts

I am working on a project that is using Jasper Reports 2.0.4 to produce official documents with stringent presentation requirements. We've run into a problem with the wrapping of text in a textfield that is set to stretch with overflow if the amount of text in the textfield causes the band to grow onto multiple pages. If the textfield uses justified textAlignment, the last line of text on the page is sometimes left justified instead of fully justified. If the textfield uses left textAlignment, the last line of text on the page sometimes ends well before it needs to.

I have read numerous forum posts, the JasperReports and iReport books, the FAQ, etc. I've ensured that the fontName and pdfFontName are pointing at the same truetype font (arial). I've tried toggling the net.sf.jasperreports.export.pdf.force.linebreak.policy property. I've verified that the problem occurs whether I'm exporting to PDF or using the JasperReports Viewer. I've also tried upgrading to Jasper Reports 2.0.5.

I've attached a sample .jrxml file and the PDF output. Note that at the end of page 3, a paragraph of text spans onto the next page, and rather than fully justifying the text, the last line is left justified. Some other pages in the sample have the problem, and other pages do not.

How can I resolve this problem?

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 1 month later...

The previous link into tracker is no longer working. Here is a new link to the bug report in tracker.

If someone is willing to point me into a starting point in the code that I can drill into to try and figure out how to resolve this issue, please do - I'm more than willing to attempt to fix it on my own, but my unfamiliarity with the internals of Jasper Reports leave me a steep learning curve to climb.

Thanks,

Greg

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