小编Jos*_*son的帖子

Epson销售点打印机 - 无法使用c#打印

我有一个Epson TM-U220A,我正在编写和c#桌面应用程序打印收据.但它无法找到打印机.

如果我通过记事本发送东西(因此它的工作),打印机打印奇怪的字符

我有以下内容:

  • POS用于.Net v1.12.exe
  • OPOSN1.11.16(.net的Espon Wrapper)
  • 安装了Espon驱动程序
  • 打印机的USB接口.

码:

private void FormLoad(object sender, System.EventArgs e)
        {

            //<<<step1>>>--Start
            //Use a Logical Device Name which has been set on the SetupPOS.
            string strLogicalName = "PosPrinter";
           // string strLogicalName = "ESDPRT001";

            try
            {
                //Create PosExplorer
                PosExplorer posExplorer = new PosExplorer();

                DeviceInfo deviceInfo = null;

                try
                {
                    deviceInfo = posExplorer.GetDevice(DeviceType.PosPrinter, strLogicalName);
                    m_Printer = (PosPrinter)posExplorer.CreateInstance(deviceInfo);
                }
                catch (Exception)
                {
                    ChangeButtonStatus();
                    return;
                }

                //Open the device
                m_Printer.Open();

                //Get the exclusive control right for the …
Run Code Online (Sandbox Code Playgroud)

c# printing epson pos-for-.net

7
推荐指数
1
解决办法
5870
查看次数

无法使用POS for .Net启用要求保护的设备

我正在使用Motorola DS4208手持式条形码读取器。过去,我能够成功设置和使用此设备,但是最近它已停止工作。这可能是由于安装了其他设备也将OPOS和POS用于.Net接口的结果。

这是一个USB设备,因此我创建了一个名为* Moto_Scanner.xml *的控制配置文件,并将其放置在正确的位置。

<PointOfServiceConfig Version="1.0">
<ServiceObject Type="Scanner" Name="Example Scanner">
<HardwareId 
    From="HID\VID_05E0&amp;PID_1300&amp;REV_0100" 
    To="HID\VID_05E0&amp;PID_1300&amp;REV_0100" />
<HardwareId 
    From="HID\VID_05E0&amp;PID_1300" 
    To="HID\VID_05E0&amp;PID_1300" />
</ServiceObject>
</PointOfServiceConfig>
Run Code Online (Sandbox Code Playgroud)

使用SOMgr.exe,可以在POSDevices中看到具有正确路径的设备。然后,我创建了MotoScan的LogicalName。然后,它按预期出现在“逻辑名称”列表中。

使用Microsoft Point of Service \ SDK \ Samples \ Sample Application \ TestApp.exe,我可以打开声明该设备的所有权。但是,尝试单击启用复选框后,我收到以下错误消息。

POSControlException ErrorCode(Failure) ExtendedErrorCode(0) occurred: Unable to enable the device.  See inner exception for details.
System.ComponentModel.Win32Exception: The process cannot access the file because it is being used by another process
   at Microsoft.PointOfService.ExampleServiceObjects.HidReader.HidThread.StartReading()
   at Microsoft.PointOfService.ExampleServiceObjects.HidReader.OpenDevice()
   at Microsoft.PointOfService.ExampleServiceObjects.ExampleScanner.set_DeviceEnabled(Boolean value)
Opened device: Example Scanner
Created …
Run Code Online (Sandbox Code Playgroud)

.net c# opos barcode-scanner pos-for-.net

5
推荐指数
1
解决办法
6401
查看次数

Windows上的POS开发:通过COM进行OPOS?.Net的OPOS?UnifiedPOS?...?

我计划从头开发POS系统,它将基于Windows(目前是XP SP3).我试图了解用于使用POS设备的API.到目前为止,我发现OPOS是作为一组COM对象实现的,一个.Net库似乎是基于COM对象和一个名为UnifiedPOS的升级标准.

问题是,COM对象似乎已经很老了.Net 1.1之后的.Net内容还没有更新.但我无法找到UnifiedPOS规范的实现.

有人知道类似于Windows的UnifiedPOS SDK吗?或者有人可以推荐使用OPOS或任何其他API吗?

.net c# opos point-of-sale pos-for-.net

5
推荐指数
1
解决办法
9679
查看次数

使用Epson T20(热敏打印机)打印和打开抽屉

我经常搜索,我在这里找到了Posexplorer的例子,但我的打印机是usb,我读过PosExplorer用于并行.我不知道如何使用打印机进行打印以及如何将代码发送到打印机以打开抽屉.

我正在使用以下代码将转义序列发送到打印机:

string ESC = Convert.ToString((char)27);
string logo=Convert.ToString(ESC+"|tL");
_oposPrinter.PrintNormal(PrinterStation.Receipt, logo);
_oposPrinter.PrintNormal(PrinterStation.Receipt, "Print example\n");
_oposPrinter.PrintNormal(PrinterStation.Receipt, Convert.ToString((char)27 + "|#fP"));
Run Code Online (Sandbox Code Playgroud)

在调试并到达行时:

_oposPrinter.PrintNormal(PrinterStation.Receipt, logo);
Run Code Online (Sandbox Code Playgroud)

要么

_oposPrinter.PrintNormal(PrinterStation.Receipt, Convert.ToString((char)27 + "|#fP"));
Run Code Online (Sandbox Code Playgroud)

打印机不打印任何内容.

c# thermal-printer pos-for-.net

3
推荐指数
1
解决办法
1万
查看次数

使用OPOS兼容硬件的事件顺序是什么?

我正在使用兼容OPOS的MSR.是事件的顺序:

  1. 打开
  2. 要求
  3. 启用
  4. 发布

c# opos pos-for-.net

2
推荐指数
1
解决办法
2034
查看次数