[reportlab-users] PTOContainer split problem
Yoann Roman
yroman-reportlab at altalang.com
Wed Aug 13 10:33:35 EDT 2008
Robin Becker wrote:
> Yoann Roman wrote:
> > I'm running across a PTOContainer problem when the content is a single
very
> > large paragraph. Attached are two files: a simple Python script and a
large
> > text file (GNU GPL, in this case).
> >
> > If I try to use the doc.build([pto]) line, I get this:
> .......
> In fact I tried your large text by inserting this into our standard test
case
> reportlab/test/test_platypus_pleaseturnover.py at line 127
>
>
> textxxx=open('/tmp/yoannroman/gnu.txt','r').read()
> ptoblob('First Try at a PTO',[Paragraph(textxxx,bt)],t0,h0)
>
> and this works even if the style is a bit busted.
I was taking a similar approach this morning in troubleshooting this. Turns
out I was importing Paragraph as:
from reportlab.platypus.para import Paragraph
Whereas test_platypus_pleaseturnover.py uses:
from reportlab.platypus.paragraph import Paragraph
I hadn't noticed the former was experimental. Changing my pto_test.py file
to use the latter fixes the problem. I'm not sure what the official status
of para.py is, so this may not be a bug at all.
Thanks for the help,
--
Yoann Roman
More information about the reportlab-users
mailing list