[reportlab-users] Combine DocTemplates into one PDF
Remy C. Cool
reportlab-users@reportlab.com
Sat, 13 Mar 2004 16:48:57 +0100
Hello,
The solution I now use for creating customer mailings is rather
elaborate and timeconsuming. At the time, a reportlab newbie, I just
had to get a working version fast. It works, but that's all there is
to say about it.
What I want to do is to create a mailing containing one or more pages
per client and store these into one single PDF file.
So I will need a sort of MailingTemplate class or function which holds
the DocTemplate and generates the PDF using this DocTemplate per
client.
def MailingTemplate(clientList, myDocTemplate):
for client in clientList:
# retrieve client data from database
...
# create flowables
...
# use my DocTemplate to generate PDF data
...
# close PDF
...
What I think I need is a method signaling the end of myDocTemplate
processing just before closing the PDF and then start a new
processing instruction for the next client-id.
I've looked into the BaseDocTemplate methods, but I don't think they
will offer a solution to this problem.
Any information is greatly appreciated.
Remy