View previous topic :: View next topic |
Author |
Message |
aleripe
Joined: 13 Jan 2009 Posts: 5
|
Posted: Tue Jan 13, 2009 8:29 am Post subject: Problem with batch processing of PDFs |
|
|
Hi, sorry for my bad English!
I'm trying to apply a stamp (as an image) to a lot composed of 1000 PDFs. My code loops through all the files, opens a new PdfDocument from PdfReader, reads each PdfPage and writes the image using XGraphicsPath before saving the PdfDocument.
The problem is that every 100 files one of them is corrupted: the modified document shows wrong colors or i'm unable to open it. If I apply the stamp only to it everything works properly.
What can I do to avoid this problem?
Thank you for your help!  |
|
Back to top |
|
 |
aleripe
Joined: 13 Jan 2009 Posts: 5
|
Posted: Thu Jan 15, 2009 3:27 pm Post subject: |
|
|
Any ideas?  |
|
Back to top |
|
 |
billy anachronism
Joined: 08 Jan 2009 Posts: 8
|
Posted: Thu Jan 15, 2009 11:35 pm Post subject: |
|
|
is it always exactly the 100th that's corrupted? |
|
Back to top |
|
 |
aleripe
Joined: 13 Jan 2009 Posts: 5
|
Posted: Fri Jan 16, 2009 1:06 pm Post subject: |
|
|
billy anachronism wrote: | is it always exactly the 100th that's corrupted? |
I can't control now, but It's strongly possible... what could be the problem in this case? |
|
Back to top |
|
 |
Thomas Hoevel

Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Jan 19, 2009 9:55 am Post subject: Re: Problem with batch processing of PDFs |
|
|
Hi!
aleripe wrote: | What can I do to avoid this problem? |
Once a document is finished you should call Dispose for that document.
PDFsharp does some caching (to improve performance). Dispose should free all resources used by a document. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
 |
aleripe
Joined: 13 Jan 2009 Posts: 5
|
Posted: Tue Jan 20, 2009 9:45 am Post subject: Re: Problem with batch processing of PDFs |
|
|
Thomas Hoevel wrote: | Hi!
aleripe wrote: | What can I do to avoid this problem? |
Once a document is finished you should call Dispose for that document.
PDFsharp does some caching (to improve performance). Dispose should free all resources used by a document. |
Oh, thank you! I will give it a try!  |
|
Back to top |
|
 |
aleripe
Joined: 13 Jan 2009 Posts: 5
|
Posted: Tue Jan 20, 2009 10:07 am Post subject: Re: Problem with batch processing of PDFs |
|
|
aleripe wrote: | Thomas Hoevel wrote: | Hi!
aleripe wrote: | What can I do to avoid this problem? |
Once a document is finished you should call Dispose for that document.
PDFsharp does some caching (to improve performance). Dispose should free all resources used by a document. |
Oh, thank you! I will give it a try!  |
I have released a new version and it seems to work properly!
Thank you for your help and this awesome component!!  |
|
Back to top |
|
 |
|