[reportlab-users] Tables in landscape moving left

Andy Robinson andy at reportlab.com
Wed Jan 8 14:04:19 EST 2014

Mike, I suspect the problem is that your table (like all others) is
centred in the frame by default. in most long documents (e.g. in word
processing), people like to see tables in the centre of the space. If
you had a small narrow table (say 4 inches wide in a 6 inch frame) you
would see this.

Try creating it like this or setting the 'hAlign="LEFT"' yourself, and
the left edge should stay put from then onwards.

t = Table(...., hAlign='LEFT')

On 8 January 2014 18:42, Mike Driscoll <mike at pythonlibrary.org> wrote:

> Hi,


> I am creating a Table flowable in Reportlab using a SimpleDocTemplate in

> landscape mode. I am trying to make the columns of the Table wide enough for

> the labels, and every time I make it a little wider, the table moves to the

> left. I am attaching a screenshot. I need to make several more of the table

> columns wider to fit the data and to make the table better cover the page.


> I noticed that if I increase the leftMargin parameter for the template, it

> will push the table to the right, but there's got to be a better way, right?


> Thanks!


> -------------------

> Mike Driscoll


> Blog: http://blog.pythonlibrary.org


> _______________________________________________

> reportlab-users mailing list

> reportlab-users at lists2.reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users


Andy Robinson
Managing Director
ReportLab Europe Ltd.
Thornton House, Thornton Road, Wimbledon, London SW19 4NG, UK
Tel +44-20-8405-6420

More information about the reportlab-users mailing list