Today, I installed this package and print success.
But I don't know how to cut paper after print?
And The content after printer appears a P character. My code:
const SerialPort = require('serialport');
const ThermalPrinter = require('thermalprinter');
function printSerial(){
let serialPort = new SerialPort('COM2', { baudRate: 19200 });
serialPort.on('open', function(){
let printer = new ThermalPrinter(serialPort);
printer.on('ready', function(){
printer
.printLine('Test')
.printLine('Test')
.printLine('Test')
.printLine('Test')
.printLine('Test')
.printLine('Test')
.print(function(){
//printer.cut();
console.log('done');
//process.exit();
serialPort.close();
});
});
});
}
The content after print on paper:
PTest
Test
Test
Test
Test
Test
I'm using:
- Electron:
11.1.1
- serialport:
9.0.4
- thermalprinter:
0.3.8
And from this package, may I print from template content?
Thank advance so much for support
Today, I installed this package and print success.
But I don't know how to cut paper after print?
And The content after printer appears a P character. My code:
The content after print on paper:
I'm using:
11.1.19.0.40.3.8And from this package, may I print from template content?
Thank advance so much for support