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

Proboscis Admin reportlab-users@reportlab.com
Mon, 18 Aug 2003 16:54:11 +0100


--Apple-Mail-7--837010877
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed

Dear All

I am getting the following error does anyone  know what it means:

'NoneType' object has no attribute 'canv'

I am trying to get the textobject to stay within the frame.
the code is

from reportlab import rl_config
from reportlab.lib import *
from reportlab.platypus import *
from reportlab.pdfgen import *
from reportlab.pdfgen import textobject
from reportlab.pdfgen.canvas import *
from reportlab.pdfbase import *
from reportlab.lib.colors import *
from reportlab.graphics import *
from reportlab.graphics.shapes import *
from reportlab.lib.units import *
from reportlab.pdfgen import textobject
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.platypus import Paragraph, Frame, flowables
from reportlab.lib import pagesizes
from reportlab.lib.styles import ParagraphStyle
#Page type
c = canvas.Canvas('table.pdf', pagesize =pagesizes.A4)
(pgwidth, pgheight) = pagesizes.A4
(width,height) = pagesizes.A4

c.saveState()

c.translate(13.5*mm,159*mm)
c.rotate(180)

story = []

f = Frame(-85*mm, -100*mm, 85*mm,100*mm, showBoundary=1)
textobject = c.beginText()
#story.append(textobject.setTextOrigin(-170*mm,-100*mm))
story.append(textobject.setFillColor(colors.black))
story.append(textobject.setFont("Verdana", 12))
story.append(textobject.textLines('''TITLE AUTHOR
kljlkjkjkjk km m, ,m, ,m, ,mjkhjk jkhnj hkmn n jmh n mn jn '''))


story.append(c.drawText(textobject))
f.addFromList(story,c)
#c.translate(13.5*mm,159*mm)
#c.rotate(180)

c.restoreState()

Thanks


--Apple-Mail-7--837010877
Content-Transfer-Encoding: 7bit
Content-Type: text/enriched;
	charset=US-ASCII

Dear All 


I am getting the following error does anyone  know what it means:


'NoneType' object has no attribute 'canv'


I am trying to get the textobject to stay within the frame.

the code is


<fontfamily><param>Geneva</param>from reportlab import rl_config  

from reportlab.lib import *

from reportlab.platypus import *

from reportlab.pdfgen import *

from reportlab.pdfgen import textobject

from reportlab.pdfgen.canvas import *

from reportlab.pdfbase import *

from reportlab.lib.colors import *

from reportlab.graphics import *

from reportlab.graphics.shapes import *

from reportlab.lib.units import *

from reportlab.pdfgen import textobject

from reportlab.lib.styles import getSampleStyleSheet

from reportlab.platypus import Paragraph, Frame, flowables

from reportlab.lib import pagesizes

from reportlab.lib.styles import ParagraphStyle

#Page type

c = canvas.Canvas('table.pdf', pagesize =pagesizes.A4)

(pgwidth, pgheight) = pagesizes.A4

(width,height) = pagesizes.A4 


c.saveState()


c.translate(13.5*mm,159*mm)

c.rotate(180)


story = []


f = Frame(-85*mm, -100*mm, 85*mm,100*mm, showBoundary=1)

textobject = c.beginText()

#story.append(textobject.setTextOrigin(-170*mm,-100*mm))

story.append(textobject.setFillColor(colors.black))

story.append(textobject.setFont("Verdana", 12))

story.append(textobject.textLines('''TITLE AUTHOR

kljlkjkjkjk km m, ,m, ,m, ,mjkhjk jkhnj hkmn n jmh n mn jn '''))



story.append(c.drawText(textobject))

f.addFromList(story,c)

#c.translate(13.5*mm,159*mm)

#c.rotate(180)


c.restoreState()


Thanks

 </fontfamily>


--Apple-Mail-7--837010877--