[reportlab-users] Multiple A6's on an A4

Andy Robinson andy at reportlab.com
Thu Apr 27 16:58:58 EDT 2006


7ep25q902 at sneakemail.com wrote:
> Hi Andy,
> 
> Thanks for the tip!
> 
> That sounds like it might help, but does not using canvases mean I
> couldn't use platypus either when I define the original A6 cards?
> Every card has a paragraph of text, appearing twice with two
> different orientations, in addition to other elements. I'm using
> platypus for word wrapping and text formatting, plus Frames for
> positioning within the card. So If I need to drop platypus to write
> every card as a form object, then that will be a problem.
> 

You can use Platypus fine.. You could create a Paragraph and draw it on 
the canvas


c.beginForm('cardname')

p = Paragraph(text, style)
p.wrap(height, width)
p.drawOn(canvas, x, y)

c.endForm()


Or, if you want frames, create a list of flowables; create a frame; and 
call
   myFrame.addFromlist(flowableList, canvas)
to draw as many as will fit.  (See methods of 
reportlab.platypus.frames.Frame


It doesn't matter how you draw it, if you draw it in a form then it's 
kept "off to one side" by the PDF format and can be reused.

Hope this helps,

Andy


More information about the reportlab-users mailing list