[reportlab-users] Table autosizing
Remi Cool
mailinglists at smartology.nl
Tue Mar 27 03:56:09 EDT 2007
Andy Robinson wrote:
> Remi Cool wrote:
>> Hello,
>>
>> I generate PDF documents from rml (xml) source. When I use let's say a
>> 2 column table, the columns are equally sized at 50% of the available
>> width. That's ok for some cases, but doesn't look good when the text in
>> the first column is not that wide. Would it be possible to autosize the
>> table to the width of the largest text fragment (in the first column) or
>> would I need to code such functionality myself?
>
> If you're using Report Markup Language (tm), it does this. You can
> also explicitly specify column widths as percentages or fixed amounts.
>
> If you are using Tiny RML, (which is not written by us), then you're
> on your own. Sorry.
>
> If using Platypus, the layer of our library which supports RML and (as
> far as I know) Tiny RML, I believe it should auto-size. It looks at a
> reasonable number of rows at the front, so auto-sizing may not be
> perfect for very long tables.
I'm using platypus (with RML) and I know I can set the column widths but
it doesn't autosize by default. Do I need to set some attribute to make
it autosize?
- Remi -
More information about the reportlab-users
mailing list