[reportlab-users] Mixed column document - tables or frames?

Angus Dickey angushfx at yahoo.ca
Wed Jun 22 17:17:58 EDT 2016


I have been looking for a solution to this for a while and tried a couple different things with no luck, so I thought I would try the mailing list.

I am trying to use ReportLab to create a pdf with a full width section (containing a flowable paragraph) at the start, a two column section in the middle, and another full width section at the end. Each of the sections can be variable length.

The first method I tried was using SimpleDocTemplate with a paragraph flowable at the top, a two column table flowable in the middle, and another paragraph flowable at the bottom. The issue here is that the table cells (really only two of them, left & right) contain a paragraph flowable of unknown length. If this paragraph is too big it will either be moved to the next page or cause a LayoutError if the cell is too big to fit on a single page. I saw another post to this mailing list about a similar issue which suggested breaking up the paragraph and putting it into multiple cells, is this the only option for using a table?

The second method I tries was using a regular BaseDocTemplate with multiple frames, but I can only get this to work by creating page templates that will always give me at least a three page document (single column, double column, single column) when the whole thing could fit on one page. Is there a way to make frames work where they switch mid-page?

Are there any other options?

Thanks for any help,


More information about the reportlab-users mailing list