[#13786] - "Spacing Before" causes line to be cut off in PDF output

Category:
Bug report
Priority:
Normal
Status:
Feedback Requested
Project: Severity:
Major
Resolution:
Open
Component: Reproducibility:
Always
Assigned to:

In a report I have several text fields that I wish to output one above the other, but sometimes they are not populated and in this case I do not wish to have blank space in the report.

To solve this, I have set the fields to be 1px in height and arranged them one above the other, spaced at 2px intervals. They are set to "StretchHeight" where appropriate.

This works very well, both within Jasper Studio and when exporting the report as a PDF.

However, when one of the fields has more than one line and also has the "Spacing Before" property set to a value above 0, the second line of text is not visible when the report is exported as a PDF. It is visible within Jasper Studio (in the report preview).

The problem can be "resolved" by setting the "Spacing Before" property on the text field that is being truncated to 0px (although that doesn't resolve the issue for me because all my text is then squashed together, vertically, with no space in between - I need to use the "Spacing Before" property).

That the problem occurs during a PDF export and not within the Jasper Studio preview suggests the "Spacing Before" property is not being sent correctly to the AWT library during the export.

v6.17.0
velw's picture
2
Joined: Jun 20 2021 - 10:26pm
Last seen: 1 year 7 months ago

2 Comments:

#1
  • Status:New» Feedback Requested

Hi can you please attach a sample report? It would help.
That said I think this is more a JasperReports Library related problem.

Regards,
Massimo.

#2

The problem is still present in version 6.18.1. I have attached an example report. The third line is missing in the pdf. Possibly this is also related to the following error: https://community.jaspersoft.com/jasperreports-library/issues/13886

AttachmentSize
Binary Data spacebeforetest.jrxml1.44 KB
PDF icon spacebeforetest.pdf1.39 KB
Feedback