[reportlab-users] Paragraphs with images are too small

Roberto Alsina ralsina at netmanagers.com.ar
Thu Jul 23 13:21:20 EDT 2009


On Thursday 23 July 2009 14:17:14 Tim Roberts wrote:

> Roberto Alsina wrote:

> > 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:

>

> As far as I know, a paragraph in Platypus does not adjust its vertical

> spacing to compensate for inline images. Your image will be drawn with

> its bottom edge on the baseline of the current line, but the baseline is

> not moved to make room for that image. If the image is very tall, it

> will overlap the stuff above it. Thus, the <img> tag is mostly useful

> for icons and other small inclusions.


Yes, that is the bug, and (IMHO) it should adjust it :-)
Since it already adjusts when it runs into the <font> tag, maybe it could do
the same thing when it finds the <img> tag, too.


> If you need a large out-of-line image, perhaps you should use the Figure

> flowable instead.


I suggest that whenever the problem arises for rst2pdf users, but in the case
of automatically generated documents this sometimes can't be done.

--
("\''/").__..-''"`-. . 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