任务:
我的代码:
private void PrintFile(string path)
{
ProcessStartInfo info = new ProcessStartInfo();
info.Verb = "print";
info.FileName = path;
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process p = new Process();
p.StartInfo = info;
p.Start();
p.WaitForInputIdle();
System.Threading.Thread.Sleep(3000);
if (false == p.CloseMainWindow())
p.Kill();
}
问题:
有些文件较大,我需要在打印时适合它。