Closed MinaZakaria closed 2 years ago
The Cash Drawer is the place that contains the money. So times we need to open the drawer when printing the receipt to add more money. There is a cable that connects from the Epson printer to the drawer. and then it wait for a command from the printer to open the cash drawer
@MinaZakaria Thanks for the explanation!
Actually, to provide this functionality we need to add the corresponding method addPulse
to handleCommand method for iOS and Android. Unfortunately, at the time I don't have the capacity to add it. But if you have, I'd really appreciate it )
Than we can just use it like:
printing()
.addText('text')
.addImage('logo.png`)
.addPulse( // args )
.addCut()
Here the method specification:
@MinaZakaria a quick way to do this
import Encoder from 'esc-pos-encoder';
....
const encoder = new Encoder();
const printing = new EscPosPrinter.printing();
encoder.pulse(0, 100, 100);
const status = await printing.data(encoder.encode()).send();
This works for me
Version 1.5.0 adds this functionality
@MinaZakaria Hi! What do you mean by Cash Drawer?