[reportlab-users] Tables

Robin Becker reportlab-users@reportlab.com
Mon, 1 Mar 2004 17:55:05 +0000

In article <BAY15-F63myCF1Hkiki0000190d@hotmail.com>, Ángela Villota
Gómez <angievig@hotmail.com> writes
>I'm new with this tool, and python too. so I want to ask you some things, I 
>think maybe you could help me!
>first, I have to apologise me about my english, it's poor.
>Then, I was trying put 3 flowables  in a page, a Table, an image and a 
>paragraph.  I was reading the user's guide and it was useful, but I can't 
>find how can I put the page in " landscape ", because I need an horizontal 
>second, How can I do that the lines in the cells of the table don't go out?
>I undestand that the size of the cells depends  from the string, but my 
>lines don't fit in the cells.
>thak you.
>Charla con tus amigos en línea mediante MSN Messenger: 

If you want landscape, just make the pagesize argument of your canvas
reflect that.

from reportlab.lib.pagesizes import landscape, A4


canv = canvas.Canvas(filename,pagesize=mypagesize)

If you want to keep text inside the cells you either need to use a
wrapping flowable in the cell eg paragraph or use simple text, but make
the column size free (ie None). I'm fairly sure we don't check the
content sizes for cells in fixed column widths.
Robin Becker