[reportlab-users] Paragraphs with images are too small
Roberto Alsina
ralsina at netmanagers.com.ar
Fri Jul 24 08:53:22 EDT 2009
On Friday 24 July 2009 05:44:31 Robin Becker wrote:
> 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.
> >
> > If you need a large out-of-line image, perhaps you should use the Figure
> > flowable instead.
>
> There is an extra style setting to allow the line heights to adjust with
> the fontSize and image heights.
>
> Try setting autoLeading='max' on the style.
With autoLeading='max' there is no overlapping except for the descending parts
of letters, the previous paragraph's baseline is flush with the image.
--
("\''/").__..-''"`-. . 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