I figured out how to print basic text to our POS printer, but I can\'t figure out how to get the escape characters to work (for bold, text alignment, etc). For now I\'m just tes
Hi just found out this answer and this works for me. try this one.
string Bold = System.Text.ASCIIEncoding.ASCII.GetString(new byte[] { 27, (byte)'|', (byte)'b', (byte)'C' });
or You can simply declare this:
string ESC = System.Text.ASCIIEncoding.ASCII.GetString(new byte[] {27});
then use it in your format or text like this:
ESC + "|cA" -- this is for center. ESC + "|bC" -- for bold.
ESC + "|bC" + "hello world" -- this will bold the string.