[reportlab-users] adjust the horizontal position of Flowable

Robin Becker robin at reportlab.com
Wed May 31 16:27:43 EDT 2006


furuichh at onid.orst.edu wrote:
> Hi,
> 
> We are creating a PDF document by using SimpleDocTemplate of ReportLab.
> 
> We know how to add a vertical space by using an instance of Spacer.
> However, we do not know how to add a horizontal space prececeeding
> a Flowable.
> 
> We thought that the first argument of the Spacer constructor,
> such as Spacer(3.0*inch, 0.2*inch), might be the
> amount of a horizontal space, but it did not cause any effect.
> 
sorry, but in practice the Spacer uses up vertical space only at 
present. However, in recent versions you can use the Indenter flowable eg

from reportlab.platypus import Indenter

then in your story you can do

story.append(Indenter(left=0.2*inch))
......add some indented flowables
story.append(Indenter(left=-0.2*inch))

you can also manipulate the right indent as well this way.
-- 
Robin Becker


More information about the reportlab-users mailing list