[reportlab-users] Table alignment in reportlab

John Pywtorak reportlab-users@reportlab.com
Wed, 17 Mar 2004 17:25:58 -0800


You can make the table the size of the page less say margins then
make a table cell that has the left alignment style, or actually I think
that may be default.  One thing to note thought is that you need at
least two columns of data in the table.  So you will need a dummy
column with empty data.

Something like:
table_data = (("Some text", ""),)

Another potential snag is that table text data does not wrap at the cell
ends, so you a Paragraph flowable; however, keep in mind that a
Paragraph flowable has to be xml entity ok, you can't have <,>,& non
encoded.

John Pywtorak

On Wednesday 17 March 2004 02:59 pm, Kalyan Jammigumpula wrote:
> Is there a way to align a Table in reportlab to the left instead of the
> default center alignment ?
> I have more than one table in my document and I wish all of them are
> aligned to the left.
> I tried the 'LEADING' property with TableStyle. It doesn't do anything
> to my table structure.
> Any help or example script would help. Yeah, I size the columns in my
> table. -k
>
> _______________________________________________
> reportlab-users mailing list
> reportlab-users@reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users