Ionic 3 Bluetooth Print

Hello,

I’m using these sample bluetooth print solution.

/////////////////////////////////////

Both solution is work fine. I just want to know how to create print design.

Like this!!!

Align-Left Align-Center Align-Right
Item Qty Price

Please, Help!!!

1 Like

Help Me, Please!

I try this one.

var receipt = ‘’;
receipt += ‘\x1b\x40’; // Clear data in buffer and reset modes
receipt += ‘\x1b\x61\x01’; // Centering
receipt += ‘\x1b\x21\x20’; // Double width text
receipt += ‘ShopName’;
receipt += ‘\n’;

receipt += ‘\x1b\x21\x00’; // Normal text

for (let i = 0; i < this.myAry.length; i++) {
receipt += ‘\x1b\x61\x00’; // Left justification
receipt += this.myAry[i].name;
receipt += ‘\x1b\x61\x02’; // Right justification
receipt += this.myAry[i].qty;
receipt += this.myAry[i].price;
receipt += ‘\n’;
}

~~~~ Result Is Like This ~~~~~~

~~~~ I Want Like This ~~~~~~

Screenshot%20from%202018-05-29%2011-34-57

I hope someone help me!

This depends on your printer and what escpos commands it accepts, check in the manual, not all the commands placed in my sample can be used on all printers.

Thank You for your reply @luccasr73!

Now i try with this

http://reliance-escpos-commands.readthedocs.io/en/latest/intro.html

If you mind, please give me sample code!

Thank you!

1 Like

Sorry for the delay, for tabular layout you can use the “Horizontal Tab Positions” and “Horizontal Tab” commands listed at http://reliance-escpos-commands.readthedocs.io/en/latest/cursor_position.html

1 Like

please Help me , Any Body

how to chinese character print?

Thanks very much, I can print English and numbers,
but can’t print Chinese word…, such as “謝謝”,
how to fix it ?
Thanks a lot

i fixed this in https://github.com/luccasr73/ionic-escpos-bluetooth-printer-sample/commit/b40d6f48f3b1f75e7cddc3b0c731083ea9a557cf