[reportlab-users] Image inside paragraph not appearing
Stevens, Ian
IStevens at globeandmail.com
Fri Jan 25 15:02:52 EST 2008
Is this code working for anyone? I've tried this on a few different
machines with the same results.
thanks,
Ian.
________________________________
From: reportlab-users-bounces at reportlab.com
[mailto:reportlab-users-bounces at reportlab.com] On Behalf Of Stevens, Ian
Sent: Thursday, January 24, 2008 4:20 PM
To: reportlab-users at reportlab.com
Subject: [reportlab-users] Image inside paragraph not appearing
I'm having trouble getting images to appear within a Paragraph
when I use the <img/> tag:
1 from reportlab.lib.styles import ParagraphStyle
2 from reportlab.pdfgen.canvas import Canvas
3 from reportlab.platypus import Paragraph, Frame
4
5 c = Canvas('test.pdf')
6 f = Frame(100, 700, 400, 100, showBoundary=True)
7 f.addFromList([Paragraph('This is a test image: <img
src="test.gif" height="5"/>. That was a test.', ParagraphStyle(None))],
c)
8 c.save()
Where test.gif is created with the following ImageMagick
command:
echo this is a test | convert -background yellow -page
200x50 text:- test.gif
The image will not display. What am I missing?
thanks,
Ian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20080125/0252bfdc/attachment.html>
More information about the reportlab-users
mailing list