[reportlab-users] the ever growing PDF

dimitri pater dimitri.pater at gmail.com
Wed Jan 31 04:56:17 EST 2007


Thanks Robin!

doc = SimpleDocTemplateDer(fname, topMargin = 50*mm)
doc.multiBuild(story, onFirstPage=voorblad,onLaterPages=pagina)
was not enough, so I added:
doc.build(story)
to 'clear' all the elements

and now it seems to work!

best regards,
Dimitri

On 1/26/07, Robin Becker <robin at reportlab.com> wrote:

>

> dimitri pater wrote:

> > Hi,

> > I have been working with Reportlab now for the 2 months and it is really

> > amazing. Big thanks to the developers of Reportlab!

> > I am working on an app that uses CherryPy (a HTTP framework), MySQL, PIL

> > and

> > Reportlab. The user uses HTML forms to create reports in PDF and it all

> > works very nice. However when I create a PDF (calling the project_id as

> an

> > argument) for the second (and third and so on), within the same session,

> > all

> > data is appended to the generated PDF (it grows and grows). This

> happens

> > also when I remove the PDF from the disk before generating the report

> for

> > the second time. Only when I start en stop the CP server process, this

> > doesn't happen. But that isn't very elegant (and I loose the session

> > info..).

> > Now, is there a way to 'reset' the PDF before it is generated.

> > I hope I am clear enough and if you need more info, just tell me

> >

> > best regards,

> > Dimitri

> ......

>

> You don't say which technology you're using. Platypus or Canvas. Usually

> the

> answer is to create a new canvas or doctemplate for each request and to

> ensure

> that the request finalizes the object at the end. There's no point in

> worrying

> about resetting a simple file.

>

> Perhaps you should outline the start and end of the PDF document in your

> request

> handler.

> --

> Robin Becker

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>




--
---
You can't have everything. Where would you put it? -- Steven Wright
---
please visit www.serpia.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://two.pairlist.net/pipermail/reportlab-users/attachments/20070131/59c52677/attachment-0001.html


More information about the reportlab-users mailing list