Search code examples
jasperserverjaspersoft-studio

Jasper Reports Server - Random white space under the lines when generating a report



I have a problem when generating a report from Jasper Server. When I generate a report from Jaspersoft Studio everything goes fine, but when I try to generate the same report from Jasper Server, sometimes unexpected white space appears at the bottom of the lines. This happens for any format: rtf, docx, odt, xlsx. The only exception is html. This happens randomly for any lines (most often in the format java.lang.String) and only when the isStretchWithOverflow option is enabled. No settings for line heights and indentation help reduce the size of this white space. When I change the font, white spaces may disappear on some lines and appear on other lines. To generate reports from the server, I use REST v2. This problem is very critical for me. Please help!


Server version: Jasper Server 7.2.0 Comunity edition
Report editor version: Jaspersoft Studio 6.10.0.
Environment:
Server version: Apache Tomcat/8.5.34
Server number: 8.5.34.0
OS Name: Linux
OS Version: 5.0.0-37-generic
Architecture: amd64
JVM Version: 1.8.0_201-b09


Add files: report body and examples of formation from Jaspersoft Studio and Jasper Server.
File docx generated from Jasper Server (with white spaces)

File docx generated from Jaspersoft Studio (correct)

Report body (jrxml)


Solution

  • The problem turned out to be unsupported fonts on the Jasper server. On the computer where Jaspersoft Studio was installed, these fonts were placed. After I added these fonts to the server, the problem was resolved.
    Sources that helped in solving the problem:
    jaspersoft community
    Jasper Reports: Adding Custom Fonts
    In my case, creating a new font was not needed - I just downloaded the existing one.