1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
/// <summary>
/// Prints the file.
/// </summary>
/// <param name="fullPath">The full path.</param>
private static void PrintFile(string fullPath)
{
FileInfo fileInfo = new FileInfo(fullPath);
if(!fileInfo.Exists)
{
throw new FileNotFoundException();
}
var printProcess = new Process();
printProcess.StartInfo.FileName = fullPath;
printProcess.StartInfo.UseShellExecute = true;
printProcess.StartInfo.Verb = "print";
printProcess.Start();
}
|