[reportlab-users] Platypus + dividing lines ?

reportlab at richardshea.fastmail.fm reportlab at richardshea.fastmail.fm
Fri Mar 21 17:25:29 EDT 2008



On Fri, 21 Mar 2008 09:53:29 -0700, "Tim Roberts" <timr at probo.com> said:

> reportlab at richardshea.fastmail.fm wrote:

> > Hi - I'm a Platypus newb but I've succesfully created a two column

> > layout. What I now what to do is to draw a line in between the columns

> > and a line at the bottom of the columns which would cross the whole page

> > (so that you'd end up with an inverted T shape of thin lines)

> >

> > I realise that I can use paths/lines (or I assume I can - not sure how

> > they fit into Platypus use) but is there any higher level mechanism

> > which I've overlooked to do this type of thing ? A sort of '<HR>' of

> > Platypus ?

> >

>

> These lines are not "flowables", in that they don't change with the

> story, so they won't really be part of the Platypus mainline.

>

> Instead, just use the onFirstPage and onLastPage callbacks in the

> document templat to draw your lines at absolute coordinates, using

> canvas.line. Just think of these as part of the page header.

>

Thanks for that. Can I ask another, related question ?

I also want thin lines to appear between two paragraphs at some points
in the document (so the line would be the width of a column).

I'm using 'addFromList' based upon a list of paragraphs to build the
story and so I'm not sure how I can do this (I suppose I could make the
line an image but that seems a bit clunky). I can't, as far as I can
see, use absolute coordinates because I don't know where the paragraph
break is going to be rendered.

I'm sure there is a way - could anyone tell ?

thanks

Richard.


More information about the reportlab-users mailing list