-
Notifications
You must be signed in to change notification settings - Fork 44
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels