[reportlab-users] Flowables, documentation

Tim Roberts timr at probo.com
Thu Nov 29 13:48:52 EST 2007


Michael Hearne wrote:

> I wanted to elaborate on the first issue I raised in my email:

>

> 1) I'm trying to create Image flowables in a report. However, the

> image gets rendered smaller than the width and height I specified.

> When I draw a frame around the Image, the frame is the size I wanted

> for the Image. Is there a way to make a Flowable take up _all_ of

> the space I specify?

>

> Here's a code example that demonstrates the issue. When you run this,

> the logo is surrounded by a bunch of white space. Why?


Because frames have padding. Did you check the source code? That's the
biggest advantage of an open source product -- you can go look it up
yourself.


> flowables.append(KeepInFrame(w,h,[Image(filename,w,h)]))

> f = Frame(x,y,w,h)


Change that to this:
f = Frame( x, y, w, h, 0, 0, 0, 0 )
and I think you'll be happier.

--
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the reportlab-users mailing list