Ionic 3 Bluetooth Print

#1

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
#2

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!

#3

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.

#4

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
#5

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
#6

please Help me , Any Body

how to chinese character print?

#7

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