[reportlab-users] Ellipsize paragraph

Henrique Romano onaiort at yahoo.com.br
Mon Jul 3 11:45:14 EDT 2006

Andy Robinson wrote:
> Henrique Romano wrote:
>> Hi,
>> There is a way in reportlab to force a Paragraph be truncate or 
>> ellipsized instead break it into multiple lines? I'm writing a patch 
>> that extends Paragraph's breakLines() method, so I can to be able of 
>> remove frags that exceeds the available width, but I'm not sure if it 
>> shouldn't be done in reportlab.
>> What do you guys think about?
> I don't understand what you mean.  By "ellipsized" do you mean "fit 
> into a rectangle with rounded corners" or "This is too long so I stop 
> here..." ?
The second option, appending a ellipsis character at the end.

> Also do you want to lose some content, or do you want to add an 
> ellipsis then continue on the next page?  If the latter, I guess it 
> could be an option so that when paragraphs are split, we inserted 
> something.

Initially, I started write this to avoid have cells with "multi-line 
paragraphs" in a table, so we'll lose content, but this can be extended 
to include ellipsis in paragraphs that need split too.


More information about the reportlab-users mailing list