How to use ESC/POS command with C#? I need format like this
but I cannot achieve this format. I tried some codes ,but no use.
using (var ms = new MemoryStream())
using (var bw = new BinaryWriter(ms))
{
// Reset the printer bws (NV images are not cleared)
bw.Write(AsciiControlChars.Escape);
bw.Write('@');
bw.Write(AsciiControlChars.Newline);
bw.Write(AsciiControlChars.Escape);
bw.Write("_______________________________________________");
bw.Write(AsciiControlChars.Newline);
bw.Write("Service Price Qty Total");
bw.Write("------------------------------------------------");
bw.Write(AsciiControlChars.GroupSeparator);
bw.Write('V');
bw.Write((byte)66);
bw.Write((byte)3);
bw.Flush();
// Send the converted ANSI string to the printer.
}
You can check this link. I now using that and It's Works!!
http://www.codeproject.com/Tips/704989/Print-Direct-To-Windows-Printer-EPOS-Receipt Use with careful, you must know ESC/POS command for thermal printer. If I'm not mistaken, the manual command must exit on the CD that came with the printer.
Kind Regards
Bonus: http://www.developerfusion.com/tools/convert/vb-to-csharp/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With