[reportlab-users] Preformatted class with text wrapping and line breaks

Robin Becker robin at reportlab.com
Mon Feb 19 13:04:07 EST 2007


Chris Wilson wrote:

> Hi,

>

> I have some text that I wish to display in a table cell. This text has

> line breaks in it placed there using \n characters. Originally I was

> using this text with the Paragraph class but the line breaks were not

> appearing in the text. I then started using the the Preformatted class

> to display the text with line breaks included. The problem is, where the

> text is wider than the border of the table, instead of wrapping as it

> did when in a Paragraph, the text simply runs over the border of the table.

>

> Is it possible to either:

> Force a Paragraph object to obey \n line breaks (or some form of

> inline line break)? or,

> Force Preformatted (or XPreformatted) object to wrap when placed

> within a table?

>

> Thanks in advance for any and all help.

>

> Chris Wilson

......

can you use Paragraph and <br/> tags in the text?


--
Robin Becker


More information about the reportlab-users mailing list