[reportlab-users] Table margin

Arkadi Colson arkadi at smartbit.be
Fri May 27 09:00:51 EDT 2011


I set all margins to 10*mm
I draw 4 lines with canvas on the margins to get a box
Then I add a table to the story with hAliagn='LEFT' and I see a little
margin before the table. So the left side of the table is not positioned
on the left margin line.
When I do story.append(Indenter(left=-2.5)) before the table, the table
moves to th left but all canvas object after the Indenter also.


On 05/27/2011 11:48 AM, Robin Becker wrote:

> On 27/05/2011 10:42, Arkadi Colson wrote:

>> It seems rule 3 also resets the Indent value for mytable. Is it

>> possible to set

>> the Indent value for each flowable individually?

>>

>> story.append(Indenter(left=-2.5))

>> story.append(mytable)

>> story.append(Indenter(left=2.5))

>>

>>

>> On 05/27/2011 10:47 AM, Robin Becker wrote:

>>> On 27/05/2011 09:21, Arkadi Colson wrote:

>>>> Hi

>>>>

>>>> Is it possible to set the left margin to a table? When using the

>>>> hAlign='LEFT'

>>>> property, the table has a small left-margin. I would like to set it

>>>> to zero.

>>>> Anybody knows how to do it?

>>>>

>>>> Thanks!

>>>>

>>> There's an Indenter flowable object which you can put in the story.

>>> It's in

>>> doctemplate so you can do the following

>>>

>>> from reportlab.platypus.doctemplate import Indenter

>>>

>>> story.append(Indenter(left=12))

>>> story.append(mytable)

>>> story.append(Indenter(left=-12))

>>>

>>

>

> It's not clear exatly what margin you're talking about. Frames have

> padding as well so if that;s what yopu're concerned about then ensure

> that your frames have zero padding instead of using the above indenter

> stuff.


--
Smartbit bvba
Hoogstraat 13
B-3670 Meeuwen
T: +32 11 64 08 80
F: +32 89 46 81 10
W: http://www.smartbit.be
E: arkadi at smartbit.be



More information about the reportlab-users mailing list