【发布时间】:2018-12-29 05:15:20
【问题描述】:
我正在尝试在 Epson TM-T20II 上打印图像。这是我的代码:
string path = @"test.bmp";
if (File.Exists(path))
{
Console.WriteLine("exists");
OPOSHelper.printer.ErrorEvent += Printer_ErrorEvent; // Do I have to configure this?
OPOSHelper.printer.SetBitmap(1, PrinterStation.Receipt, path, PosPrinter.PrinterBitmapAsIs, PosPrinter.PrinterBitmapCenter);
OPOSHelper.printer.PrintNormal(PrinterStation.Receipt, "\x1B|1B");
}
else
{
Console.WriteLine("DOES NOT EXIST!!!");
}
当我运行它时,我得到了下一个错误:
方法 SetBitmap 引发了异常。特定于类的错误条件 发生。错误条件代码在 ResultCodeExtended 属性
我想阅读ResultCodeExtended property,但我找不到方法,我必须配置ErrorEvent吗?或者应该怎么读?
【问题讨论】: