Open bhargavpmistri opened 5 months ago
I'm using master
branch and it has "2" text on every print session with BLEPrinter.printText(text)
method.
Same problem, have you guys found a solution?
@arnoldochavez @bhargavpmistri @vozaldi Add a manual delay on your end after each print command.
function Sleep(ms: number) {
return new Promise((res) => {
setTimeout(ms, () => {
res()
)
});
}
With the above code you can do the following
...
printLineOne()
await Sleep(50)
printLineTwo()
await Sleep(50)
printLineThree()
Sleep(50)
...
With the above, all of the items you print will be printed in the correct sequence.
@thecodecafe there isn't a problem with the sequence of the printing, the problem is that a 2 appears when printing
Same bug here, i solved using the encoding option, ex:
const printTextTest = () => {
currentPrinter &&
BLEPrinter.printText('<C>Testing...</C>\n', {
encoding: 'UTF-8', // -> Add this line
});
};
const printTextTest = () => { currentPrinter && BLEPrinter.printText('<C>Testing...</C>\n', { encoding: 'UTF-8', // -> Add this line }); };
I tested this config and it works for my BLE printer. Thanks @jltrench
Current Behavior