Closed lenoch7 closed 5 months ago
Set the net.sf.jasperreports.export.pdf.force.linebreak.policy property to true to make sure that the same line break policy is applied when measuring the texts and on PDF exporting.
Also, if you need to use a font extension with a embedded PDF font (for instance DejaVu Sans from jasperreports-fonts) to ensure that the font metrics used for text measuring are consistent with the PDF export.
Thank you for quick answer. This configuration solves the problem.
I am sorry for stupid question and for creating this issue (now I see it in JRPdfExporter
javadoc too). I knew about difference between AWT measurement and PDF exporting, but I completely missed ForceLineBreakPolicy
. I am sorry again.
I have very weird problem with stretching. I created very simple jrxml to demonstrate this problem (is attached), in reality DataSource is used of course. I am using Linux and I tested it with version 6.20.5 and 6.21.2.
stretch-truncation-reports.zip
The problem here is that text is truncated to
ab-abcdefghijkl.mnopqrstuvwxyz012345
(3 lines) (6789
is missing). I attached pdf file too.It seems like there is a problem with
-
(dash) or.
(dot) characters, because:-
to "usual" letter, than it works.
character, than it works (sometimes? probably depends on dot character position)IMHO, there is a some problem with height calculation in context of
BreakInterator
.I hope, I am not completely wrong (I mean jrxml file), but if I tested similar/same jrxml file (
textAdjust
vsisStretchWithOverflow
) with very old version 4.5.0 it works as is expected (or at least it seems like it).