I try to print the check with the help of the library , the problem is that the text is written, but the check does not crawl out, that is, the printing does not stop. How to be?

Printing device: Nippon NP-F309 thermal printer.

So I bring the information to the check:

outEndpoint.transfer('Hello, World', (error) => { console.log('outEndpoint.transfer', error); }) 

but a check is not issued.

    1 answer 1

    As a result, came to this decision at the moment:

    1. We connect the escpos library.
    2. There is a printer.cut () method that truncates the check, but again didn’t work on my printer. I had to go into the sources, they have commands sent to the printer. I see that PAPER_FULL_CUT: '\ x1d \ x56 \ x00', and for my printer I need the command '\ x1b \ x69'.
    3. I am changing the method on my server like this:
     printer.cut = function (part, feed) { this.feed(feed || 3); this.buffer.write('\x1b\x69'); return this; } 

    Now the check is cut off.

    But in general, everything can be done with one library - https://www.npmjs.com/package/usb .