Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
compassbelgium opened this issue May 3, 2024 · 0 comments
Open

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

compassbelgium opened this issue May 3, 2024 · 0 comments

Comments

@compassbelgium
Copy link

compassbelgium commented May 3, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant