[reportlab-users] spaceShrinkage for PARAGRAPH.Style or Canvas._charSpace. The both not worked.

Maxim Danilov info at twinboards.at
Sat Apr 28 07:12:31 EDT 2018


I try to set more space between letters.

Paragraph.style.spaceShrinkage = 5 - Paragraph draws normal without more space.

if i try to change Canvas setting, like this
canv._charSpace = 5
Paragraph.draw() 
Paragraph draws normal without more space.

I see in reportlab.platypus.paragraph.Paragraph ,
Paragraph.draw()  call .drawPara
And in drawPara() i see call canvas.drawText(), this Function don’t use charSpace!!!
Otherwise canvas.drawString used charSpace settings.

Probably, it is the “bug” in drawPara.

I think, it should be in Paragraph.drawPara():
line 1835. #set up the font etc.
line 1836. tx = self.beginText(cur_x, cur_y)
new line: if if style.spaceShrinkage: tx.setCharSpace(charSpace)

Or i have mistake thinking?

Mit freundlichen Grüßen,
DI Mag. Maxim Danilov

+43(681)207 447 76
info at twinboards.at





More information about the reportlab-users mailing list