IBM Support

Reducing Line Height setting doesn't work in PDF but does in HTML

Troubleshooting


Problem

We tried to change line height under Spacing and Breaking property to make the text use less space (vertically), but that is not reflecting in PDF format. It works in HTML Format

Symptom

Cause

The behavior in IE is inconsistent. The effect of specifying a line height that is smaller than the size of the text contained in the line, is for the line to ignore the padding. This happens only if the padding is defined at the class level, if the padding is defined on the object, then it is not ignored. Firefox interpertation of this style is to honor it no matter what. This causes the text to be overwritten by the following line.

Resolving The Problem

There are three possible ways to work around this:

1) Set the top and bottom "Padding" on the cell to 0. We'll probably also need to set the vertical justification of the cell to "Middle". Note that if the line height is set to less then the font size, the text will be clipped.
2) Use the "table-layout: fixed" on the table and then specify the width and height of every cell defined. The effect of this will be that the height will honored regardless, but anything which exceeds the width height will be clipped.
3) Put a block inside the details with fixed height and overflow:clipped in this case the height is honored and extra text is also clipped.

[{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU053","label":"Cloud \u0026 Data Platform"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.4","Edition":"All Editions;Edition Independent","Line of Business":{"code":"","label":""}},{"Product":{"code":"SSEP7J","label":"Cognos Business Intelligence"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Report Studio","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"","label":"HP Itanium"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"8.4","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
28 November 2022

UID

swg21437889