Search code examples
pythonreportlab

ReportLab Two-Column TOC?


I have a PDF I am generating using ReportLab. I am using the standard TableOfContents flowable, but am trying to split it up into two columns, so it will all fit on the first page. the content will only ever be on one level, so I am not worried about odd-looking indentations.

Right now I have the PageTemplate using 2 Frames to create 2 columns on the first page. I get a

LayoutError: Flowable <TableOfContents at 0x.... frame=RightCol>...(200.5 x 720) too large on page 1 in frame 'RightCol'(200.5 x 708.0*)

Any ideas?


Solution

  • Well, color me embarrassed.

    For anyone else having this problem, check your DocTemplate for allowSplitting. The default is 1, but I had changed mine to 0 and that was the reason.

    *facepalm*