How can I reduce the height of a line break which occurs when a paragraph length is too long for the width of the ColumnText?
I’ve tried the following, as I’ve seen other questions which answered with this:
p.Leading = 0
But this has made no affect.
I’ve also tried increasing the Leading to 100 to see if a larger line break is added, but neither work.
SpacingBefore/SpacingAfter doesn’t help either:
p.SpacingBefore = 0
p.SpacingAfter = 0
How can I reduce this?
When using a table, you need to set the leading on the cell itself. However, you’ll see that the
Leadingproperty is read-only so instead you’ll need to use theSetLeading()method which takes two values, the first is the fixed leading and the second is the multiplied leading. According to this post here:To shrink the leading to 80% you’d use:
EDIT
Sorry, I saw “Column” and my coffee-lacking brain went to tables.
For a
ColumnTextyou should be able to use the Paragraph’s leading values just fine.On my machine running iTextSharp 5.1.2.0 this produces two lines of text that are slightly squished together.