Open pr1ntr opened 3 months ago
Testing with this code:
import printer from '@woovi/node-printer' import { ThermalPrinter, PrinterTypes, CharacterSet, BreakLine } from 'node-thermal-printer' const PRINTER_NAME = 'Star MCP30' const device = new ThermalPrinter({ type: PrinterTypes.STAR, interface: `printer:${PRINTER_NAME}`, characterSet: CharacterSet.ISO8859_2_LATIN2, lineCharacter: '═', breakLine: BreakLine.WORD, driver: printer, options: { timeout: 1000 } }) let isConnected = await device.isPrinterConnected() async function printFromDevice() { if(isConnected) { device.newLine() device.newLine() device.println("Hello World") device.println("Hello World") device.println("Hello World") device.println("Hello World") device.newLine() device.partialCut() try { await device.execute() } catch(err) { console.error(err) } } } printFromDevice()
after it prints it just sits in the queue
Check if printer requires a response. Some printers wait for a specific command to be sent. This feature can be disabled in printer drivers
Testing with this code:
after it prints it just sits in the queue