[reportlab-users] Preformatted problem with split and join error

Remy C. Cool reportlab-users@reportlab.com
Tue, 10 Dec 2002 08:16:29 +0100


On Monday 09 December 2002 19:52, Robin Becker wrote:
> In order to figure out exactly what's going on I'd need to have an
> example and the font info used to figure out exactly why this is
> happening. Is it possible you have some empty lines on the end?

This is the line in the xml file that get's parsed: 

<pre>show this as is ... <b>e x a c t l y</b></pre>

Everything between the pre tags is stored in a variable (temp_storage) 
and fed to the Preformatted flowable class. I use the Normal style of 
whom the font is Times-Roman I think. Since only the data between the 
pre tags is stored, there are no newlines or empty lines present 
(checked that first).

styles = getSampleStyleSheet()
self.styleN = styles['Normal']

self.flowables.append(Preformatted(temp_storage, self.styleN, 
bulletText=None, dedent=0))

I'm going to rewrite/reorder some of my code and will do some more 
tests with the preformatted class.


Remy Cool