paystory-de / thermal-printer-cordova-plugin

Cordova wrapper for ESC/POS Thermal Printer library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ThermalPrinter.printFormattedText via bluetooth

Spiridonidis opened this issue · comments

I use the plugin to my Ionic / Angular App, the plugin seems to work, i can list the available devices.. etc. However, when i use the function ThermalPrinter.printFormattedText it console logs me that the print was successfull but my printer doesnt print. I use the LK-P30II bluetooth thermal printer.
Sample of my code
`print() {
let self = this;
window.ThermalPrinter.printFormattedText({
type: 'bluetooth',
id: 'my name', // You can also use the identifier directly i. e. 00:11:22:33:44:55 (address) or name
text: '[C]Hello World' // new lines with "\n"
}, function() {
console.log('Successfully printed!');
}, function(error: any) {
console.error('Printing error', error);
});

}`