There are 2 Issue I am facing using the POS Command
For POS Command, i am using dll downloaded from Nuget : PrinterUtility
PrinterUtility.EscPosEpsonCommands.EscPosEpson
1) Barcode Does not Print Alphanumeric Characters In this,
PrinterUtility.EscPosEpsonCommands.EscPosEpson obj = new PrinterUtility.EscPosEpsonCommands.EscPosEpson();
var ByteValue = PrintExtensions.AddBytes(ByteValue,obj.BarCode.Code128("454541234"));
It only accepts numeric value not alphanumeric, so i did in another way to generate barcode using below code, but barcode is not generated.
public byte[] BarcodeGenrate(string BarcodeNO)
{
string GS = "\u001D";
string ESC = Convert.ToString((char)27);
string COMMAND = "";
COMMAND = GS + "h" + 50;//Set barcode height
COMMAND += GS + "H" + 2; //Select print position of HRI characters:
COMMAND += GS + "f" + 1; //Select font for HRI characters:
COMMAND += GS + "k" + 4 + BarcodeNO + 0; //Print barcode: (A) format, barcode system = CODE39
var result = System.Text.Encoding.Unicode.GetBytes(COMMAND);
return result;
}
2) Cut Page : This is also not working
public byte[] CutPage()
{
string GS = Convert.ToString((char)29);
string ESC = Convert.ToString((char)27);
string COMMAND = "";
COMMAND = ESC + "@";
COMMAND = GS + "V" + (char)1;
var result = System.Text.Encoding.Unicode.GetBytes(COMMAND);
return result;
}
Kindly help me with ESC/POS Command to generate Barcode Code128 and CutPage Command