JasperReports library seems to be miscalculating how many new lines the text field need to fit all its contents. In JasperReports Studio (in preview) everything looks fine, but not when exporting to PDF from my application.
I've read PDF FAQ from JasperReports and I tried setting PROPERTY_FORCE_LINEBREAK_POLICY
in the report to true
, but this didn't make any difference. I also experimented with various fonts, but then in runtime Java complained about missing font in AWT, so I guess my default font (SansSerif
) is just fine.
When I print "english only" version of the report, then everything looks okay, because all texts are about a half in length, but when using longer texts (like in example below) then this line miscalculation happens.
Here is how it looks right now and I marked unwanted extra lines with red:
Since I've tried with both hints from JasperReport's PDF FAQ, what else can I do?
I found the solution:
jasperreports-fonts
extension included in the project.The new font is a tiny bit wider, but that's okay. Other than that it looks very alike.