[reportlab-users] very basic questions
Robin Becker
robin at reportlab.com
Thu Jul 20 06:39:34 EDT 2006
bobby f wrote:
> ok. I just wanna add acouple of images and flowing
> text to a page.
>
> I already have a cnavas object. how does platypus
> interact w/ that?
>
> c=Canvas('x.pdf')
> t=Text(very long string with paragraphs')
> c.add(t)
> c.add(image)
>
> can i do this?
You can do images directly on the canvas with canvas methods; flowing text is
harder, but you can do it with a paragraph using the wrapOn method and drawOn
methods.
canv.drawImage(image,x,y,width=None,height=None)
None stands for use image values
P=Paragraph('''text....''',style=ParagraphStyle(name='normal'))
P.wrapOn(canv,width,height)
P.drawOn(canv,x,y)
--
Robin Becker
More information about the reportlab-users
mailing list