Re: Line-wrapping in tables
Tim Roberts <[email protected]>
| Newsgroups | gmane.comp.python.reportlab.user |
|---|---|
| Organization | Providenza & Boekelheide, Inc. |
| Message-ID | <[email protected]> |
Steve Hill wrote: > I'm having some trouble making line-wrapping or Paragraphs work in > tables. If the Paragraph text has spaces in it then it works fine, but > text that has no spaces doesn't wrap at all - it (rather unreadably) > overflows off the right hand side of the table cell and then off the > edge of the page. > > Is there any way for me to tweak the line wrapping rules to make them a > bit more sensible? What would be "more sensible"? ReportLab doesn't do hyphenation. If there are no spaces, then there's no place to break. Genuine hyphenation is hard. Really hard. There is a dump hyphenator in ReportLab (lib/textsplit.py), but it doesn't use English rules. It just inserts the hyphen at the last place it fits. If you just want to have the long text wrap at the last character that fits, you can do that yourself. It's not hard. -- Tim Roberts, [email protected] Providenza & Boekelheide, Inc.