public static bool SendByteArrayToPrinter(string szPrinterName, Byte[] bytes) { int size = Marshal.SizeOf(bytes[0]) * bytes.Length; IntPtr pBytes = Marshal.AllocHGlobal(size); Marshal.Copy(bytes, 0, pBytes, bytes.Length); RawPrinterHelper.SendBytesToPrinter(szPrinterName, pBytes, size); Marshal.FreeHGlobal(pBytes); return(true); }
public void OpenDrawer() { Byte[] sequence = new Byte[1]; sequence[0] = 0x1C; RawPrinterHelper.SendByteArrayToPrinter(this.printerName, sequence); }
public void SendJob() { RawPrinterHelper.SendStringToPrinter(this.printerName, this.accumulatedText); }