[reportlab-users] Doubts about split()

Roberto Alsina ralsina at netmanagers.com.ar
Fri Nov 14 08:18:37 EST 2008

I am not sure I understand split() for platypus flowables.

The docs say if a flowable can split:

Clever flowables should split themselves and return a list of flowables. It
is up to the client code to ensure that repeated attempts to split are

This is because split can return [self] right? So I must check if the flowable
has already been "splitted" and in that case what should I return?

If the space is sufficient the split method should return [self]. Otherwise
the flowable should rearrange itself and return a list [f0,...] of flowables
which will be considered in order.

Suppose I have a box B containing paragraphs P1 P2 P3. The suppose P1 would
fit in the available space.

I should return [Box(P1),Box(P2,P3)] , right?

Sorry about the pseudo code, I mean two boxes, one containing P1, the other P2
and P3 ;-)

What should I return when there is no way to fit anything in the available
space and everything should be moved to the next page?

("\''/").__..-''"`-. . Roberto Alsina
`9_ 9 ) `-. ( ).`-._.`) KDE Developer (MFCH)
(_Y_.)' ._ ) `._`. " -.-' http://lateral.netmanagers.com.ar
_..`-'_..-_/ /-'_.' The 6,855th most popular site of Slovenia
(l)-'' ((i).' ((!.' according to alexa.com (27/5/2007)

Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it. --Brian W. Kernighan

More information about the reportlab-users mailing list