【发布时间】:2017-05-09 04:01:52
【问题描述】:
Epson ESC POS Drawer Kick 命令可以控制 1 个或 2 个现金抽屉
ESC p m t1 t2
我们想使用 WebClientPrint API 打开钱箱 webclientprint.azurewebsites.net
问题: 打印文本文件时打印机工作正常。 但是当我们给 0x0A0x1B0x700x000x190xFA0x0A 这个命令给打印机 钱箱打不开。
然后我使用另一种方法 ESC/POS 给打印机。
[AllowAnonymous]
public void PrintCommands(string useDefaultPrinter, string printerName)
{
ClientPrintJob cpj = new ClientPrintJob();
cpj.BinaryPrinterCommands= System.IO.File.ReadAllBytes(Server.MapPath(@"~/App_Data/open.txt"));
cpj.FormatHexValues = true;
cpj.ClientPrinter = new DefaultPrinter();
System.Web.HttpContext.Current.Response.ContentType = "application/octet-stream";
System.Web.HttpContext.Current.Response.BinaryWrite(cpj.GetContent());
System.Web.HttpContext.Current.Response.End();
}
【问题讨论】:
标签: asp.net-mvc-4 printing epson