2
您好我已经在我的系统中安装了Star TSP100 Cutter(TSP143)打印机驱动程序,并测试了打印机,它打印了所有内容。但现在我想通过c#中的代码处理打印机,如剪纸,打印机,打印正常等。我已经使用下面的代码来实例化打印机。当我查询打印机时,它返回null。pos explorer没有找到任何设备连接到C#系统#
任何建议或帮助,如果我走错了路。 谢谢
public static DeviceCollection GetPrinters()
{
PosExplorer explorer = new PosExplorer();
return explorer.GetDevices(DeviceType.PosPrinter, DeviceCompatibilities.OposAndCompatibilityLevel1);
}
public static DeviceInfo GetPrinter(string name)
{
if (String.IsNullOrEmpty(name))
return null;
PosExplorer explorer = new PosExplorer();
return explorer.GetDevice(DeviceType.PosPrinter, name);
}
PosExplorer explorer = null;
DeviceInfo device = null;
PosPrinter printer = null;
DeviceCollection printers = GetPrinters();
DeviceInfo printers2 = GetPrinter("Star TSP100 Cutter (TSP143)");
我已经解决通过为.Net v1.12重新安装POS的问题..现在它正在寻找打印机,但逻辑上..现在我已将打印机连接到系统并安装该打印机的驱动程序。现在我怎样才能打印物理使用POS探险家.. – 2012-07-11 14:38:04