[reportlab-users] Understanding Wordwrap, esp. in tables

Andrew Smart smart at smart-knowhow.de
Wed Nov 14 08:32:07 EST 2007


Hi,

I'm trying to understand word wrapping in Platypus, especially the behaviour
inside tables.

I've a quite simple table which alings the text "left". The word wrapping
seems to try to fill out the whole line, which is commonly adressed as
"block" formatting where spaces are inserted between the words to fill up
the whole line.

I would like to use a "left" oriented word wrapping. The style parameter
"wordWrap" doesn't know anything other than 'CFK' if I look at the source:

if self.style.wordWrap == 'CJK':
#use Asian text wrap algorithm to break characters
self.blPara = self.breakLinesCJK([first_line_width,
later_widths])
else:
self.blPara = self.breakLines([first_line_width, later_widths])

Do I have to implement a left-oriented word wrapping routine by myself or is
any other option avaiable?

If so, anyone interested into the final code?

Regards,
Andrew







More information about the reportlab-users mailing list