我需要您的帮助才能在不使用打印对话框的情况下打印本地保存的文件,我尝试了很多情况但都失败了。一种情况是这样的;
var pr = new PrintDocument();
pr.PrintController = new System.Drawing.Printing.StandardPrintController();
pr.PrinterSettings = new PrinterSettings();
pr.PrinterSettings.PrintFileName = "E:\\File.docx";
pr.PrinterSettings.PrinterName = fileName.ToString();
pr.Print();
pr.Dispose();