我需要在控制台应用程序中打印任何文档类型,我尝试过
使用System.Drawing.Printing,但在VS中找不到。
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
答案 0 :(得分:1)
这对我有用:
ProcessStartInfo info = new ProcessStartInfo(filePath);
info.Verb = "Print";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);