I am printing a receipt of items. I need Item names in Left side and Price of items at right side.
I am using new TextPrintJob.Builder().text(String.format("\n%-23s %6s", "Item", "Price");
to print the string with item name and price.
As items name's length are different I feel trouble to give exact spacing to the price. Is there any way to specify right allignment for printed string?