[reportlab-users] How to use forms in combination with Platypus

Remi Cool mailinglists at smartology.nl
Fri Feb 17 09:02:48 EST 2006


I want to use a form to print a watermark text on every page, normally
not a problem, but I'm using platypus for my document generation. The
problem is that I can't define the form before docTemplate.build is
called. You need the canvas to define the form and the canvas is not
present beforehand (beforeDocument).

How can I solve this problem without hacking the docTemplate class?

Using the form should not be a problem ... I think ... am I correct that
I can use the onPage method of the PageTemplate to accomplish this task?

def watermark(canv, doc):

myPageTemplate.onPage = watermark


- Remi -

More information about the reportlab-users mailing list