ike_li
 public void DrivePrint(string filePath)
        {
            
string pdfPath = filePath;
            System.Drawing.Printing.PrintDocument pd 
= new System.Drawing.Printing.PrintDocument();
            Process processInstance 
= new Process();
            ProcessStartInfo startInfo 
= new ProcessStartInfo();
            startInfo.UseShellExecute 
= true;
            startInfo.Verb 
= "Print";
            startInfo.CreateNoWindow 
= true;
            startInfo.WindowStyle 
= ProcessWindowStyle.Hidden;
            startInfo.Arguments 
= @"/p /h \" + pdfPath + "\" \"" + pd.PrinterSettings.PrinterName + " \"";
            startInfo.FileName 
= pdfPath;
            processInstance.StartInfo 
= startInfo;
            processInstance.Start();
            processInstance.CloseMainWindow();
        }

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2021-04-27
  • 2021-10-01
  • 2022-01-02
  • 2021-11-21
  • 2021-06-30
猜你喜欢
  • 2022-12-23
  • 2021-05-23
  • 2022-01-12
  • 2021-12-24
  • 2021-12-27
  • 2021-08-05
  • 2021-07-24
相关资源
相似解决方案