bluetooth_print icon indicating copy to clipboard operation
bluetooth_print copied to clipboard

Correctly implement mapToEscCommand for type text (iOS)

Open xni06 opened this issue 2 years ago • 0 comments

Fixes #24 Fixes #31

fixed-receipt-text

To achieve the above results, use the following and will work on both Android and iOS:

List<LineText> list = [];

list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 1, height: 1, underline: 1, content: 'ANDROID'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, content: ''));

list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 0, height: 0, underline: 0, content: 'normal'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 0, height: 0, underline: 0, content: 'bold'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 0, height: 0, underline: 1, content: 'underline'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 0, height: 0, underline: 1, content: 'bold underline'));

list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 0, height: 1, underline: 0, content: 'tall'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 1, height: 0, underline: 0, content: 'wide'));
list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 0, width: 1, height: 1, underline: 0, content: 'tall wide'));

list.add(LineText(type: LineText.TYPE_TEXT, linefeed: 1, weight: 1, width: 1, height: 1, underline: 1, content: 'everything!'));

xni06 avatar Dec 04 '21 12:12 xni06