Reduce paragraph line break height on iTextSharp -



Reduce paragraph line break height on iTextSharp -

how can cut down height of line break occurs when paragraph length long width of columntext?

i've tried following, i've seen other questions answered this:

p.leading = 0

but has made no affect.

i've tried increasing leading 100 see if larger line break added, neither work.

spacingbefore/spacingafter doesn't help either:

p.spacingbefore = 0 p.spacingafter = 0

how can cut down this?

when using table, need set leading on cell itself. however, you'll see leading property read-only instead you'll need utilize setleading() method takes 2 values, first fixed leading , sec multiplied leading. according to post here:

multiplied means, larger font, larger leading. fixed means same leading font size.

to shrink leading 80% you'd use:

dim p1 new paragraph("it best of times, worst of times") dim c1 new pdfpcell(p1) c1.setleading(0, 0.8)

edit

sorry, saw "column" , coffee-lacking brain went tables.

for columntext should able utilize paragraph's leading values fine.

dim cb = writer.directcontent dim ct new columntext(cb) ct.setsimplecolumn(0, 0, 200, 200) dim p1 new paragraph("it best of times, worst of times") ''//disable fixed leading p1.leading = 0 ''//set font-relative leading p1.multipliedleading = 0.8 ct.addelement(p1) ct.go()

on machine running itextsharp 5.1.2.0 produces 2 lines of text squished together.

itextsharp line-breaks paragraph

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -