[reportlab-users] canvas inside canvas?
Wed, 17 Sep 2003 19:53:05 +0100
In article <3F68A08B.email@example.com>, Oliver Bleutgen <firstname.lastname@example.org>
>I have a canvas which contains several fixed sized areas, in which my
>application adds images (via canvas.drawImage(...)). Now I want to
>extend that to canvas-like objects, i.e. something like
>canv = canv.Canvas(filename, pagesize=(1000,1000))
>subcanv1 = canv.Canvas('dummy.pdf', pagesize=(500,500))
>subcanv1.lines( ... ) # draw some lines
>subcanv1.drawImage( ... ) # draw an image
># this doesn't exist:
>Any tricks how to do something like that? Perhaps by mucking around with
>Or would the graphics.Drawing class be the thing to look at?
>It seems to be able to hold Bitmap Images, though this is undocumented.
>Thanks for the great product, btw.
you need canvas forms. I think these are in canvas.py
see methods beginForm, endForm, doForm.