I'm trying to make a button that sends a command to open the cash drawer connected to the TP-650 Tanca printer. Below is the method I'm trying to do.
public static void abrirGaveta(bool flag)
{
if (flag == true && Properties.Settings.Default.ImpressoraGaveta == 1)
{
//Metoto para abrir a gaveta
const int charCode = 27;
const int charCode2 = 251;
const int charCode3 = 227;
var specialChar = Convert.ToChar(charCode);
var specialChar2 = Convert.ToChar(charCode2);
var specialChar3 = Convert.ToChar(charCode3);
string cmdText = "" + specialChar + specialChar2 +"22|" + specialChar3;
string driver = "TANCA TP-650";
string comandoAbertura = cmdText;
RawPrinterHelper.SendStringToPrinter(driver, comandoAbertura);
}
}
There is no error, but it does not open the drawer either.