Printing on bluetooth printers

same here, do you find out the solution???

Actually you dont need mutable buffer, you can use it like this when preparing for print

            let CMD = this.data;  // data are shortcut codes declared before
            let printtext = ' ';
            printtext+= CMD.TEXT_FORMAT.TXT_ALIGN_CT;
            printtext+=  "Some text here";
            printtext+= CMD.TEXT_FORMAT.TXT_ALIGN_CT;
            printtext+= CMD.EOL;
            printtext+=  "Some text here";
            printtext+= CMD.TEXT_FORMAT.TXT_ALIGN_CT;
            printtext+= CMD.EOL;
            //AND THEN JUST:
            this.bluetoothSerial.write(printtext).then(success => {
              console.log("Printed successfuly!")
            }, error => {
              console.log("Error!");
            });

And if you find solution for printing qr code pls share :smiley:

Hello… I am having a problem while printing receipt… Half of the receipt is being printed…I have used mutable buffer also…nothing is working…I am deploying this app on a device having Android 9 and using Ionic version 3.9.2…Can I know the possible reason behind this issue since everything was working fine on older device?

Hi razmans,
Thanks for your post, Everything is working well. Can you share document or website on where you get the styling codes.

Did you find any solution. facing same exact issue

Did this work for you. I am facing same issue where only partial data is being printed.

When I print this
I got few characters of the print string as shown in image. I used bluetooth LE.

let str = "\x1b\x61\x00 Name: \x1b\x61\x00 \x1b\x61\x02 John \x1b\x61\x02 \x1b\x61\x00 Age: \x1b\x61\x00 \x1b\x61\x02 24 \x1b\x61\x02    \x1b\x61\x00 City: \x1b\x61\x00 \x1b\x61\x02 Berlin \x1b\x61\x02    \x1b\x61\x00 Gender: \x1b\x61\x00 \x1b\x61\x02 Male \x1b\x61\x02";

var array = new Uint8Array(str.length);

for (var x = 0, l = str.length; x < l; x++) {

  array[x] = str.charCodeAt(x);

}

this.ble.writeWithoutResponse('22:23:sd:23:82:4F', "34343434-fe7d-4ae5-8fa9-9fafd4354545".toLowerCase(),

  "54545445-8841-43f4-a8d4-ecbe356556bb3".toLowerCase(), array.buffer);

I need to print a formatted reciept.Can you help?

Need to print something like this

I used mutable buffer for receipt printing. Below is my print.service.ts which I made about 6 months ago. It was in a rush, so its very messy. The mutable buffer stuff starts at line 252. The mutable buffer that I used here is version 2.1.1