[reportlab-users] Word wrap on Table.
Pedro Ghilardi
pghilardi at gmail.com
Mon Feb 8 08:12:15 EST 2010
For example:
first_row = [
Paragraph('Header title 1', styles['Normal']),
Paragraph('Header title 2', styles['Normal'])
]
second_row = [
Paragraph('a', styles['Normal']),
Paragraph('b', styles['Normal'])
]
third_row = [
Paragraph('c', styles['Normal']),
Paragraph('d', styles['Normal'])
]
This will not wrap like I want. Because it will consider the width of
the chars 'a' and 'c' to wrap the first column and the width of chars
'b' and 'd' to wrap the second column. Then, the 'Header title 1' and
'Header title 2' will not fit on the table.
On Mon, Feb 8, 2010 at 11:06 AM, Robin Becker <robin at reportlab.com> wrote:
> On 08/02/2010 12:48, Pedro Ghilardi wrote:
>>
>> I'm having problems on word wrap table. I think that the word wrap
>> isn't considering the header (first column) of my table.
>>
>> I create a Paragraph for each cell and set the Normal style to each
>> paragraph. For example, if I have a 3 x 3 table and if the header
>> content is greater than the other rows, the wrap algorithm fails. It
>> wraps based on the second and third column only.
>>
>> What I'm doing wrong?
>>
>
> Can you post a small example script to illustrate what's going wrong?
> --
> Robin Becker
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at lists2.reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
>
--
Pedro Ghilardi
email: pghilardi at gmail.com
homepage: http://www.pedroghilardi.rg3.net
More information about the reportlab-users
mailing list