[reportlab-users] Report lab tables

Tim Smith reportlab-users@reportlab.com
Mon, 04 Oct 2004 21:59:27 +1000


if i try use that  get this error
AttributeError: ImageReader instance has no attribute '_width'

here is a snip of my code

logo = Image('logo.jpg')
Invoice = []
Invoice.append(Paragraph('Tax Invoice', styles['Heading1']))
Invoice.append(logo)


Andy Robinson wrote:

>>There seems to be an Image class in platypus - why don't you try using
>>that the same way you would use a Paragraph? Just add it to the list of
>>elements, and build it into the document.
>>
>>    
>>
>
>Correct!
>
>from reportlab.playpus import Image
>i = Image('myfile.gif')
>story.append(i)
>
>
>The Image object takes these arguments:
>class Image(Flowable):
>    def __init__(self, filename, width=None, height=None, kind='direct',
>mask="auto", lazy=1):
>        """If size to draw at not specified, get it from the image."""
>
>This and most other flowables are covered int he test scripts.  Run
>the suite, look at the PDF files in the temp directory with 'platypus'
>in the name, then look at the scripts that made them if there's a
>feature you want...
>
>Good luck,
>
>Andy
>
>_______________________________________________
>reportlab-users mailing list
>reportlab-users@reportlab.com
>http://two.pairlist.net/mailman/listinfo/reportlab-users
>
>
>  
>