2009-08-05 49 views
5

我有一個文件夾一次只能包含一個tiff文件,所以當我收到一個文件時,我應該可以將它打印到默認打印機。我有一個小的Windows應用程序,它正在尋找特定文件夾中的任何tiff文件。我只需在收到tiff文件的時候將其打印到默認打印機。如何自動打印tiff文件

有沒有人有任何想法如何使用C#做到這一點?

+0

http://www.c-sharpcorner.com/UploadFile/mgold/PritinginCSharp11222005040630AM/PritinginCSharp.aspx這裏是一個很好的鏈接來看看http://www.bobpowell.net/generating_multipage_tiffs.htm – MethodMan 2013-01-18 13:41:34

+0

安裝虛擬TIFF打印機http://www.zan1011.com/ – MethodMan 2013-01-18 13:46:31

回答

4

由於OP的評論說,這可以用這段代碼完成:

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