treh1966 / ESCPOS-Printing-in-Node.js

This is my implementation of ESCPOS Printing from within node nw.js applications
MIT License
23 stars 9 forks source link

Can't get ESCPOS to work #9

Open Pimnr47 opened 7 years ago

Pimnr47 commented 7 years ago

Hi,

I have a debian arm based mini pc setup with node (V6) and a cheap thermal printer (ZJ-58xx) and CUPS installed with the thermal printer as a raw driverless printer. the lp commands like:

lp -d printer_name -o raw filename

works fine. But I cannot make a simple .js script that runs with node and your module to print anything...

Code:

Printer = require('./escpos_printing.js');
//BTW your suggested require('escpost_printing.js') gives a module not found error
//So I moved escpos_printing.js to mij scripts directory

Printer.test();
Printer.ESCPOS_INIT();
Printer.append("HELLOOO PURE ESCPOS HERE");

var sucess = Printer.ESCPOS_PRINT(What to put here??);
   if(!sucess){
      console.log(Printer.ESCPOS_LASTERROR);
   }

Thank you so much in advance

treh1966 commented 5 years ago

Looks like just a typo escpos / escpost