[reportlab-users] how to make 2-page graphics?

Andy Robinson reportlab-users@reportlab.com
Fri, 12 Sep 2003 22:57:49 +0100


>
> I don't have a showPage() object.  I have a Drawing object that I print to
> PDF like so:
>
> renderPDF.drawToFile(drawing, 'out.pdf')
>
> If I have drawing1, drawing2, etc, how would I add all those to one file?

Drawings are flowables and thus can draw themselves on
the canvas at given locations, or can be flowed into
a longer story.  The first technique is like this:

  c = Canvas('myfile.pdf')
  drawing1.drawOn(c, 0, 0)
  c.showPage()
  drawing2.drawOn(c, 0, 0)
  c.save()

Thanks,

Andy