[reportlab-users] Doubts about split()

Andy Robinson andy at reportlab.com
Fri Nov 14 08:33:28 EST 2008

2008/11/14 Roberto Alsina <ralsina at netmanagers.com.ar>:

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


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

That should work. I don't think we ever tried a list of more than 2
items; it probably also works if you just return this, as I would hope
anything not fitting is added to the list for the next page.
[Box(P1), Box(P1), Box(P1)]

> 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?

Return []. This is the default implementation for a Flowable anyway.
I just slightly expanded the docstring in Flowable.split to mention this.

- Andy

More information about the reportlab-users mailing list