paystory-de / thermal-printer-cordova-plugin

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

Property 'id' does not exist on type 'Printer'. #58

Open compassbelgium opened 6 months ago

compassbelgium commented 6 months ago

printTicket(ticket:string) { this.thermalPrinter.listPrinters({type: 'usb'}, (printers) => { if (printers.length > 0) { var ptr = printers[0]; this.thermalPrinter.printFormattedText({ type: 'usb', id: ptr.id, text: ticket // new lines with "\n" }, function() { console.log('Successfully printed!'); }, function(error) { console.error('Printing error', error); }); } else { console.error('No printers found!'); } }, function(error) { console.error('Ups, we cant list the printers!', error); }); }

ionic version 7.2.0 capacitor version 5.5.1 angular version 17.3.1