zoukankan      html  css  js  c++  java
  • 驱动打印

     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();
            }
  • 相关阅读:
    Python 单向循环链表
    python 单向链表实现
    Python实现栈
    单进程-非阻塞服务器
    Nginx开发从入门到精通
    Spring入门第十五课
    Spring入门第十六课
    Spring入门第十四课
    Spring入门第十三课
    Spring入门第十二课
  • 原文地址:https://www.cnblogs.com/ike_li/p/2036574.html
Copyright © 2011-2022 走看看