Re: How can I determine with pdfdoc.save has finished saving

91 views
Skip to first unread message

Support

unread,
Dec 21, 2012, 5:14:39 PM12/21/12
to pdfne...@googlegroups.com
 
It there a reason why you are creating explicit temp files? You could create temp files in memory (e.g. new PDFDoc() ... ). Unless you explicitly disabled disk caching PDFNet will store stuff in temp files anyways (to decreases memory load).
This way you don't need to worry about temp file business at all. In case you still want/need to use your own temp files. You need to make sure to close PDFDoc-s (e.g. pdfdoc.Close() or pdfdoc.Dispose()) after pdfdoc.Save() but just before you try to delete the file.
 
 

On Wednesday, December 19, 2012 12:23:01 PM UTC-8, JT wrote:

I have an application that is using pdfdoc to merge some temporary pdf files into one pdf. As it creates each temporary pdf, it uses pdfdoc.save to append it to the final pdf.  Then I delete the temporary pdf file. 

I've had some sporadic errors where I get a message that the temp pdf file is missing or access denied.  I think this is because I'm deleting the temporary pdf before the pdfdoc.save has finished? I quit deleting my temporary files and I did not get the error anymore. 

QUESTION: is there a way to tell if the save is finished so I can delete the temporary files? I looked at the api and could not find anything to use.

Reply all
Reply to author
Forward
0 new messages