我正在尝试在 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
吗?或者它应该如何阅读?