代码如下:
string documentPrinterRegPath = @"SOFTWARE\LEAD Technologies, Inc.\19\\Printer\";
PrinterInfo printerInfo = new PrinterInfo();
printerInfo.MonitorName = printerName;
printerInfo.PortName = printerName;
printerInfo.ProductName = printerName;
printerInfo.PrinterName = printerName;
printerInfo.Password = printerPassword;
printerInfo.RegistryKey = documentPrinterRegPath + printerName;
printerInfo.DriverName = "Leadtools Printer";
printerInfo.RootDir = @"C:\LEADTOOLS 19\Bin\Common\PrinterDriver\bin\";
printerInfo.Url = "https://www.leadtools.com";
printerInfo.PrinterExe = @"D:\work\test\TestPrint\TestPrint\bin\Debug\TestPrint.exe";
printerInfo.AboutString = "LEADTOOLS Printer";
//printerInfo.AboutIcon = System.IO.Path.Combine(Leadtools.Demos.DemosGlobal.ImagesFolder, "PrinterDriver.ico");
对应的目录下存在exe文件
但运行后报错:connection file not found。
有遇到过类似问题的吗 ?请问如何解决?