How to print tiff files automatically

I have a folder that will only contain one tiff file at a time, so the moment I get one, I should be able to print it to the default printer. I have a small windows application that searches for any tiff files in a specific folder. I just have to print it to the default printer when I receive the tiff file.

Does anyone know how to do this using C #?

+5
source share
1 answer

As OP says in the comments, this can be done using this piece of code:

System.Diagnostics.Process printProcess = new System.Diagnostics.Process();
printProcess.StartInfo.FileName = strFileName;
printProcess.StartInfo.Verb = "Print";
printProcess.StartInfo.CreateNoWindow = true;
printProcess.Start();
+4
source

All Articles