[reportlab-users] flowing images in paragraphs

Mircea Uifalean mircea at basesoft.ro
Mon Feb 21 05:04:47 EST 2011


Hey everybody.

I'm trying to have a paragraph with images in a pdf, but I'm having
problems with flowing text. The image I use is a bit taller than one
line of text, so the text that comes after it just overlaps the image.
Any ideas how I could solve this problem ?

I'm using reportlab.platypus.paragraph.Paragraph, and I already feed the
proper RML into it (I hope). Looks something like this (it comes from a
RTE, so users can add images wherever they want in the content):

<img width="25mm" height="25mm" src="http://...url/to/image.png"
valign="top" /> <br/> Hello world ! This is a link: <a
href="http://www.google.com/" color="blue">Google</a> . <u>And now
<b>just</b> some dummy</u><strike>text to fill up</strike> <br/> some
space... <br/> <br/> <b>Lorem ipsum dolor sit amet, consectetur
adipisicing elit,</b><i>sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua</i>. Ut <font color="#bc6e6e" >enim </font>ad <font
backColor="#ffdfbf">minim </font>veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.

The rest of the tags I got working properly, with bold, italic, strike,
etc. Only the image seems problematic. And if I use valign="bottom" for
example, it will overlap the text that's on top of the paragraph, which
is also not good.

Thanks in advance for any tips/help.

--
Regards,
Mircea Uifalean
Basesoft Solutions SRL

str. Bihorului 10
400295 Cluj-Napoca
Romania
Tel +40364263589
Fax +40364263589
mircea at basesoft.ro
www.basesoft.com

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure.
If you are not the intended recipient, please telephone or email the sender and delete this message and any attachment from your system.
If you are not the intended recipient you must not copy this message or attachment or disclose the contents to any other person.



More information about the reportlab-users mailing list