[reportlab-users] Aligning tablle example
Paul Barrass
paul.barrass at safeonlinebilling.com
Wed Jul 8 16:45:30 EDT 2009
Mike Driscoll wrote:
> Andy Robinson wrote:
>> 2009/7/8 Mike Driscoll <mdriscoll at co.marshall.ia.us>:
>>
>> Tables have a property 'hAlign', in common with many other flowables.
>> Sorry it wasn't documented - inside ReportLab we use the RML layer on
>> top so tend not to notice.
>>
You seem to be working late tonight Andy? Let me answer this - take a
break ;)
> tbl = Table(data, hAlign=TA_LEFT)
>
> story.append(tbl)
> doc.build(story)
>
> </code>
>
> This creates an pdf with the table centered. I take it that there's a
> different way to enable this?
>
try tbl.hAlign='LEFT'
or see:
http://two.pairlist.net/pipermail/reportlab-users/2008-November/007679.html
where this has been answered before (also by me..)
Paul Barrass.
More information about the reportlab-users
mailing list