1
I’m trying to send a command to open my cash drawer automatically by my application, but no success so far. I contacted the manufacturer of the drawer and printer (Non fiscal) to Bematech and they indicated me a download with a dll that I have to use and an info file where I have some information that follow below...
Parameters: Command: STRING with the command you want to execute. Command Size: INTEGER with the size of the command that will be sent.
Example: Example in Visual Basic Command to Trigger Cash Drawer sComando = Chr( 27 ) + Chr( 118 ) + Chr( 140 ) iRetorno = Commandtx( sComando, Len( sComando )
// Example in Delphi // Command to Trigger Cash Drawer
Like := #27 + #118 + #140; iReturn := Commandtx( sComando, Length( sComando );
The return of this function is given through an integer value, where if the return is: 1 (a): Success. The function was executed smoothly.
0 (zero): Communication error.
But now I’m having trouble understanding the logic of how to send this command to the printer for it to open the drawer. I can send similar as I send the receipt print?
Example of how I print...
insira o código aqui
//--------------------------------Impressão do recibo ---------------------------//
// popular relatório
var report = from p in _objListProduct
select p;
var rpDepartament = new crSaleDepartament();
rpDepartament.SetDataSource(report);
rpDepartament.SetParameterValue("NameUser", _nameUser);
rpDepartament.SetParameterValue("NameDepartament",
//impressão direta do .rpt sem conversão
rpDepartament.PrintToPrinter(1, false, 0, 0);