jrm82 Posted August 26, 2008 Posted August 26, 2008 I have an application that prints PDF files using Gnostice PDFtoolkitX. The app looks in a directory and prints each PDF using a foreach loop. If the files are smaller (<5mb) it works fine. However, the actual files will be from 10 - 20 MB and the app crashes (Catrostropic Failure exception) with large files. I'd like to try to introduce a delay after it sends each file to the printer. (Speed really isn't an issue) I think my options are System.Threading.Thread.Sleep or using a Timer. This app does not have a UI so I'd rather not use the Timer. Does just wondering if Thread.Sleep would also stop the processing of the file by the print spooler? I'd just like it to pause the beginning of processing the next file to print. Is there another better way to do this? Sorry if this isn't in the correct topic. Quote
Nate Bross Posted August 26, 2008 Posted August 26, 2008 System.Threading.Thread.Sleep(...); is a valid approach to putting a time delay in your application. You could also use a timer -- even without a GUI. Might be worht a look Quote ~Nate� ___________________________________________ Please use the [vb]/[cs] tags on posted code. Please post solutions you find somewhere else. Follow me on Twitter here.
jrm82 Posted August 27, 2008 Author Posted August 27, 2008 Thanks, I think there is just a problem with the Gnostice PDFtoolkit that can't handle the large files, and no amount of delay will solve that. Quote
Recommended Posts