[reportlab-users] Paragraphs with images are too small

Roberto Alsina ralsina at netmanagers.com.ar
Thu Jul 23 10:03:21 EDT 2009


This is a bug I reported in may and got no response, thought it would be ok to
refresh it. I apologize if it's not.

Here's a test case. What you will see is that the image in the second
paragraph completely overlaps the first paragrah:

from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet
styles = getSampleStyleSheet()

def go():
Story=[]
doc = SimpleDocTemplate("phello.pdf")
style = styles["Normal"]
p = Paragraph('This should be above the image', style)
Story.append(p)
p = Paragraph('<img src="thanks.png">', style)
Story.append(p)
p = Paragraph('This should be below the image', style)
Story.append(p)
doc.build(Story)

go()



--
("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)


More information about the reportlab-users mailing list