Hi there
I am running through a database, generating pre-completed application forms for a number of clubs. When I reach a new club, I want to close the current document, and open a new one.
Although SaveAsPdf() will "close" the file and save it, the next file generated contains everything from the first club and the second club, and so on. The 5th club contains pages from 5 clubs!
I have tried adding a Close() in the loop, makes no difference...
Is there any way to clear the old data in the file before continuing with the new file?
Regards
=Pat
wcPdfDocument - closing and opening a new document
-
- Earned a small fee
- Posts: 16
- Joined: Mon Sep 06, 2010 6:58 am
Re: wcPdfDocument - closing and opening a new document
Instances of wxPdfDocument are not meant to be reused for generating a new separate PDF document.Pat Verner wrote:I am running through a database, generating pre-completed application forms for a number of clubs. When I reach a new club, I want to close the current document, and open a new one.
Although SaveAsPdf() will "close" the file and save it, the next file generated contains everything from the first club and the second club, and so on. The 5th club contains pages from 5 clubs!
I have tried adding a Close() in the loop, makes no difference...
Yes, just instantiate a new wxPdfDocument object for each club.Pat Verner wrote:Is there any way to clear the old data in the file before continuing with the new file?
Regards,
Ulrich
-
- Earned a small fee
- Posts: 16
- Joined: Mon Sep 06, 2010 6:58 am