[reportlab-users] Page headings in platypus

Robert Young Robert at AbilitySys.com
Wed Nov 4 08:48:00 EST 2009

That sounds like *exactly* what I want!!! How do I "import" the DocIf
function? (i.e., I get an error with " from reportlab.platypus import

- Robert

-----Original Message-----
From: reportlab-users-bounces at lists2.reportlab.com
[mailto:reportlab-users-bounces at lists2.reportlab.com] On Behalf Of Robin
Sent: Wednesday, November 04, 2009 4:29 AM
To: For users of Reportlab open source software
Subject: Re: [reportlab-users] Page headings in platypus

Robert Young wrote:

> Thanks, that's (almost) exactly what I needed. My current code is

> reading in each line, and putting each one out as a separate

> "paragraph." Under that sort of arrangement, I want to put out the

> header when a paragraph is the first one on a new page.


> I think I can rewrite my code to put out all the lines for a group as


> single paragraph, and my test show that the PTOContainer gives me the

> header when the paragraph goes over a page boundary, but just for


> is there a way to generate a header when a paragraph is the first


> on a page?


> - Robert


In latest reportlab there are new Programming Flowables which allow
execution based on the state of the current doctemplate and frame etc

I think you should be able to use something like

DocIf('string boolean expression',[thenflowables],[elseflowables])



prior to your lead paragraph for each section.
Robin Becker
reportlab-users mailing list
reportlab-users at lists2.reportlab.com

More information about the reportlab-users mailing list