[reportlab-users] Re: error : 'NoneType' object has no attribute 'canv'

Proboscis Admin reportlab-users@reportlab.com
Mon, 18 Aug 2003 18:12:44 +0100

Dear Robin

Thank you for your help it was greatly appreciated.   I have another 
question: using the
color="red">aaaaaa</font>'stylesheet['Code']) method I cannot use &&&&& 
or >>>>> which might be a problem,
  as the community tool I am created using reportlab were the user will 
input his text. do you have any advice how to overcome this?


On Monday, August 18, 2003, at 05:26 PM, Robin Becker wrote:

> In article <357E534C-D194-11D7-8E28-0030654ABF76@proboscis.org.uk>,
> Proboscis Admin <admin@proboscis.org.uk> writes
> Hi Mr Proboscis, sorry about your problem.
> First textobjects are not flowables so in general I don't recommend 
> that
> you attempt to add them randomly to stories.
> Second the Frame class is intended to be used as part of the document
> template class' internal book keeping. Unless you are prepared to
> inherit from them as a base class and provide a lot of other
> infrastructure I fear you may go wrong using them like this.
> You should decide if you intend to draw directly onto PDF canvases or 
> to
> use the DocTemplate classes which allow for more structured objects.
> In the former case texts are done like this
>         txt = canvas.beginText(indent, vertical_offset)
>         txt.setFont(fontName,fontSize)
>         txt.textOut('aaaaaaaa')
>         canvas.drawText(txt)
> etc
> in the latter it would be wise to append flowables to a story list. 
> Then
> you can use
>         story.append(Paragraph('<font color="red">aaaaaa</font>',
>                 stylesheet['Code'])
> etc.
> -- 
> Robin Becker
> _______________________________________________
> reportlab-users mailing list
> reportlab-users@reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users