[reportlab-users] getKeepWithNext attribute error

Andy Robinson andy at reportlab.com
Wed Jan 31 02:41:00 EST 2007


Riaan Bekker wrote:

> Ok, think I found the problem here. I populate the self._flowables with

> a list of FRAMES, and as far as I can see FRAMES are not flowables, they

> are containers. So when I populated the list with PARAGRAPHS, then it

> created the PDF document, although it was empty.

>

>

>

> I am not sure how FRAMES and PARAGRAPHS fit together. How do I tell the

> document that I have a BASEDOCTEMPLATE with 4 frames (3 columns at top,

> 1 body frame) and then how to I tell the PARAGRAPHS that it belongs to a

> certain FRAME?

>

>

>

> At the moment I did the following:

>

>

>

> 1. Setup a class and derive from BaseDocTemplate.

> 2. Setup a pageTemplate.

> 3. Setup Frames

> 4. Add frames to the pageTemplate

> 5. Add the pageTemplate to the list of page templates

> 6. create a flowable list of paragraphs

> 7. use the build method and send the flowable (full of paragraphs)

>

>

>

> The PDF is then still empty. How do I tell the paragraphs to go into

> certain frames?


That looks about right. Can you post us a running program here?

Also have you looked at any of the test scripts such as
reportlab/test/test_platypus_*.py

test_platypus_general.py is too complicated but the others all
make a template, make a story and run it, and they produce
a PDF file with the same name as the test when run?


(We do need a complete, runnable tutorial-style example in the docs,
but the team has absolutely no time to create one in the next 2 weeks.
We'll try to get one in for the next release...)

- Andy


More information about the reportlab-users mailing list