我有以下代码,我在将打印机置于行模式后发送,但它只是在吞下后打印'51'[ESC]A
更改字体的命令是[ESC]A51
var hexValue = "1B"; // ESC char in HEX
var asciiValue = System.Convert.ToChar(System.Convert.ToUInt32(hexValue, 16));
var stringVal = new string(new char[] { asciiValue });
stringVal = stringVal + "A51"; // Smaller Font
data = Encoding.Default.GetBytes(stringVal + NewLine);
connection.Write(data);