[reportlab-users] KeepInFrame Shrinkage

Philippe Robitaille philippe.robitaille at sheridanc.on.ca
Fri Aug 22 13:32:05 EDT 2008


Hello:

I am building an application that calls for some flowables to keep together in the same frame. I opted for the shrink action to take when the text is too long. This action seemed like the least offensive relative to masking, overflowing or raising an error.

I have two points to be made about this.

First, for the most part, shrinking the flowables renders beautifully with text that has a small recuction in point size. Very elegant. However, on some instances I yield PDF output where the keepInFrame objects are shrunk to some ridiculously small point size. I can't see that there is a way to specify maximum shrinkage. But I think there should be. I will not be able to use shrink if it renders even a small percentage of instances as un-readable.

Secondly, I am wondering if you should not consider another form of action for KeepInFrame. If you have a flowable with a dozen lines of text, it might be reasonable to offer a "reduce leading" action as well. And of course there might be a "tighten kerning" action although this does not seem to be a primitive supported at all. All good things in time, I suppose.

Are there any words of advice? Maybe I should be considering some contortions with a Try/Except using the raise error action.

Regards,
phil robitaille


More information about the reportlab-users mailing list