[reportlab-users] Consuming two frames with a Paragraph

Federico Fanton federico at panizzolo.it
Mon Sep 20 10:45:27 EDT 2010


Andy Robinson wrote:

> On 20 September 2010 08:27, Federico Fanton <federico at panizzolo.it> wrote:

>> I need to achieve this behaviour:

>> - if a Paragraph doesn't fit inside Frame A, split it and fill Frame B too.

>> - if a Paragraph DOES fit inside Frame A, leave Frame B empty (using up its

>> space).

>>

>> In both cases, the next Paragraph has to start at Frame A of the next page.

>

> It sounds like you should just be able to add a PageBreak() in the

> story after your paragraph, and the right things should happen.

> Have you tried that?



You are right of course, but I realize I was overzealous in trying to
simplify my example, I'm sorry :(

In reality my PageTemplate has 3 pairs of Frames, and each pair should
work as stated before.. You could think of them as Frames A1 and B1, A2
and B2, A3 and B3, like this:

+----+----+

| A1 | B1 |

+----+----+

| A2 | B2 |

+----+----+

| A3 | B3 |

+----+----+

So, every Paragraph should start on the "A" frame and eventually fill
the corresponding "B" frame, or leave it empty.

In this situation I can't use PageBreak, since A2-A3 would be skipped
completely.. I tried using FrameBreak instead, but of course if the
Paragraph is too small, the break ends up inside the A frame itself and
the next Paragraph shows in B...

Thanks again for your attention!


More information about the reportlab-users mailing list