问题
I need to print any doc type in console app, i tried
using System.Drawing.Printing, but it could not be found in VS.
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();
回答1:
This worked for me:
ProcessStartInfo info = new ProcessStartInfo(filePath);
info.Verb = "Print";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process.Start(info);
来源:https://stackoverflow.com/questions/51926369/print-document-in-c-sharp-console-app