qz-tray.js raw printing. Print job getting cancelled from printer queue

463 Views Asked by At

I am using qz-tray to print some bills using a dot matrix printer (Epson LX 310). The code I use is as follows

qz.websocket.connect().then(function() {
  console.log("Connected!");
});
var printer = "Epson LX-310";
var config = qz.configs.create(printer);
var data = [data_string];
qz.print(config, data).catch(function(e) { console.error(e); });

There are no errors when running the code, and the print job is added to the printer's queue. But it is rejected right away.

The version of qz-tray I use is 2.1.2 and the OS is Windows 10.

0

There are 0 best solutions below