paystory-de / thermal-printer-cordova-plugin

Cordova wrapper for ESC/POS Thermal Printer library
Apache License 2.0
50 stars 39 forks source link

noting printing in zebra printer #41

Open swati199308 opened 1 year ago

swati199308 commented 1 year ago

I used this plugin to connect zebra printer through Bluetooth but while clicking on the print it showing printing is successful but nothing is printing in thermal printer. Can you please guide me what is wrong on the app used this fuction only printViaBluetooth(){ console.log('enter into 33 line') ThermalPrinter.listPrinters({type: 'bluetooth'}, function(printers) { console.log('enter into 35 line') console.log('enter into 35 line')

         let printer = printers[0];
         console.log('enter into 39 line' + printer)
         console.log('enter into 40 line' + printer.address)
          // Permission granted - We can print!
          ThermalPrinter.printFormattedText({
              type: 'bluetooth',
              id: printer.address,
              text: '[C]<u><font size="big">Hello World</font></u>' // new lines with "\n"
          }, function() {
              console.log('Successfully printed!');
          }, function(error) {
              console.error('Printing error', error);
          });    
}, function(error) {
    console.error('Ups, we cant list the printers!', error);
});

}