Re: Position Paragraph or how to get current position
Andy Robinson <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Message-ID | <CABjtApsk=6y7F=A_-J_xwHOEB4Mfm4gr1H9kbnzYL19Sr=0uJg@mail.gmail.com> |
Mike, on the table: you can draw any flowable in canvas mode if you first call object.wrap(availWidth, availHeight), which will return the width and height within that space that it actually wants to use. Practically, width was never used and is always the width of the frame, but height tells you where your table will end. This height will be to the bottom of the table. We define the edges as a zero-width line at the midpoint of the bottom border. However, by default all table cells have 3 points of padding between the content and edges (overrideable by you) on the inside; there is no padding around the inside. So to put a paragraph straight after, you'll want to set its baseline a bit lower. This is going from memory as I don't have a development environment to hand. Hope it helps... On 16 October 2013 22:39, Mike Driscoll <[email protected]> wrote: > Hi, > > I am attempting to add a table and then a Paragraph to my document list that > I plan to build. The table looks like it's in the right place, but the > Paragraph is indented about an inch. Is there a way to position the > Paragraph object along it's horizontal axis? > > Here's a slightly different question. If I wanted to switch to purely > canvas-based drawing, is there a way to tell where a table ends so I > wouldn't draw over it? For example, if I drew a table using its drawOn() > method, is there a way to tell where the table's last line of data was drawn > so I could draw underneath it? > > Thanks, > > ------------------- > Mike Driscoll > > Blog: http://blog.pythonlibrary.org > > _______________________________________________ > reportlab-users mailing list > [email protected] > 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