[reportlab-users] Position Paragraph or how to get current position

Andy Robinson andy at reportlab.com
Fri Oct 18 15:27:33 EDT 2013


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 <mike at pythonlibrary.org> 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

> 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