[reportlab-users] Bounded text (truncated)

Tim Roberts timr at probo.com
Thu Jan 4 13:17:52 EST 2007


Michael Hipp wrote:

> Hello,

>

> I'm fairly new to ReportLab. Thanks for a great tool.

>

> I'm trying to find a way to print "bounded" text. Meaning I want the "field"

> it is printed in to be a certain specified size and never exceed that size. If

> a text value is printed that would go beyond that size, then the text should

> be truncated.

>

> Is there some simple way to accomplish this?

>


This question started me to thinking -- always a dangerous thing.

Postscript fully supports path clipping. Does the PDF subset support
that as well? One way to implement what he describes would be to
establish a clipping rectangle, then draw the text, then free the
clipping rectangle.

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



More information about the reportlab-users mailing list