Closed bahrul-rasyid closed 6 years ago
if you don't send endofline with "println" function, try some "flush" function, like
.cut()
.flush()
.close(() => {
console.log('close');
});
I think it's because flush()
was called twice from cut()
and close()
.
So I modified this at printer.js, then it works
Printer.prototype.cut = function(part, feed){ this.feed(feed || 3); this.buffer.write(_.PAPER[ part ? 'PAPER_PART_CUT' : 'PAPER_FULL_CUT' ]); // return this.flush(); return this; };
my print function :
close's callback never called.
The first time calling this function, the printer works, and next calling throw this error
Thanks