【发布时间】:2021-10-21 07:30:38
【问题描述】:
在使用打印机设备名称之前,我有这样的代码,但我们迁移了 现在在打印机上使用 ip 地址,我现有的代码看起来像这样
...
internal void ProcessInformation()
{
PosExplorer posExplorer = new PosExplorer();
DeviceCollection receiptPrinterDevices = posExplorer.GetDevices(DeviceType.PosPrinter);
DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter, "SRP2");
PosPrinter printer = (PosPrinter)posExplorer.CreateInstance(receiptPrinterDevice);
printer.Open();
printer.Claim(10000);
printer.DeviceEnabled = true;
printer.PrintNormal(PrinterStation.Receipt, "test print 1");
}
...
我需要帮助才能开始,例如如何使用 PosExplorer 编写代码,使用 ip 地址将 api 连接到打印机并使用标题和正文格式进行打印?
【问题讨论】:
标签: c# sdk azure-sdk-.net opos