Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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

~Nate�

___________________________________________

Please use the [vb]/[cs] tags on posted code.

Please post solutions you find somewhere else.

Follow me on Twitter here.

Posted

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...