Closed muhammadsr closed 3 years ago
@muhammadsr
In summary, yes you need to manage the text and spacing. Most of the samples in our SDK use pre-formatted blocks of text for easier maintainability but our CommandBuilder has a ton of methods to make your life easier.
One of those methods, appendHorizontalTabPosition, lets you define "columns" so you can format your receipt data. Take a look at the screenshot below for an example.
Two tabs have been defined at position 5, and 24; implicitly we're also using the left edge as a 3rd column which does not need to be defined as a tab position. These values (5, 24) directly relate to the number of characters per line; for 3" printers a maximum of 48 characters per line are allowed.
In between each piece of text, you can see the escape sequence for the tab character.
That was very helpful. Thank you for that info @gare-bear
Do we have to manually format the receipt and manage the spacing/text? Is there a template that already has a specific format and we can use?