[reportlab-users] Printing double on a page?

Tim Roberts timr at probo.com
Thu Jan 4 19:49:24 EST 2007


Michael Hipp wrote:

> Could someone give me a general idea of the best approach for this...

>

> We have US letter paper perforated along the middle. I want to put a nearly

> identical print on the top half and the bottom half. The paper then gets torn

> in half and the top is "Office Copy" and the bottom says "Customer Copy".

>

> I can see a lot of ways it can be done in ReportLab, but thought someone might

> know the "best" way.

>


The way I do this is to put the drawing code in a function, and pass in
the starting Y offset.

class MyDrawer:
...
def drawOneHalf( self, x, y ):
c = self.canvas
c.drawString( x, y-4*inch, 'This is my title' )
...

def drawWholeThing( self ):
self.drawOneHalf( inch/2, inch/2 )
self.drawOneHalf( inch/2, 11*inch/2 )

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list