[#8181] - Line Spacing Inconsistent Across Outputs Methods

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

We've been experiencing difficulties getting a consistent look when trying to use line spacing in Static Text and Text Field elements. I've attached a PDF that shows screenshots from Jaspersoft Studio and various preview options. We have checked this in our live environment as well and the results are the same. The most important issue is getting the HTML version and PDF version to look the same. Our clients need both.

We would like to take advantage of line spacing as it can help the overall design of a report. Up until now, we've either used multiple text boxes (for titles, headers, etc.) or we just leave the default setting (for larger areas of text). This makes for a cluttered jrxml file and a less-than-optimal report design for our clients.

Thanks,
Jeff

AttachmentSize
PDF icon line_spacing.pdf843.82 KB
v6.2.1
jlyons's picture
75
Joined: Jul 30 2015 - 10:43am
Last seen: 2 years 1 month ago

6 Comments:

#1

Do you have a test case (JRXML+font) to reproduce the behaviour? I made a quick test, the PDF and HTML looked similar to me.

Regards,
Lucian

#2

I have de same problem when include HTML in email body message. Any idea to resolve it?

#3
  • Status:New» Feedback Requested

As Lucian said it would be nice if you guys attach a JRXML + font used to reproduce the issue.

Best regards,
Massimo.

#4

Similar is a subjective term. They either match or they don't. In my experience, they don't match, hence the reason for my ticket. I've attached a very simple JRXML along with three screenshots. Each screenshot is a different Preview mode in Studio (HTML, Java, and PDF). Java and PDF are pretty close (but not exact), but you can see that the HTML is way off even when I use a "native" font like DejaVu (which we don't use). The second font is a Goole font we use on a regular basis for report titles, which are often on more than one line.

The most obvious place to look is at the "Fixed Spacing: 26.00" text spacing below the first line. The "2" is touching the "p" in the second case and almost touching using a plain serif font.

The only way for me to ensure consistency is to use a separate text box for each line, which is fine for static text, but not really feasible for dynamic Text Fields.

AttachmentSize
Package icon text_test.zip98.88 KB
#5

Here are the Oswald Google font files.

AttachmentSize
Package icon oswald.zip40.69 KB
#6
Feedback
randomness