We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
val printableTotal = TextPrintable.Builder() .setText("Total") .setAlignment(DefaultPrinter.ALIGNMENT_LEFT) .setEmphasizedMode(DefaultPrinter.EMPHASIZED_MODE_NORMAL) .build() val printableTotalValue = TextPrintable.Builder() .setText("20000") .setAlignment(DefaultPrinter.ALIGNMENT_RIGHT) .setEmphasizedMode(DefaultPrinter.EMPHASIZED_MODE_NORMAL) .setLineSpacing(10) .setNewLinesAfter(5) .build()`
")
The text was updated successfully, but these errors were encountered:
@mazenrashed
Sorry, something went wrong.
You have to format your string. I format my Strings in a method like this (32 Characters in Line for my Printer)
private String formatForColum (String item, String price) { float f1 = Float.parseFloat(price); String formattedPrice = String.format("%.02f", f1); //2 Decimals String column1Format = "%-24.24s"; // fixed size 24 characters, left aligned String column2Format = "%7.7s"; // fixed size 7 characters, right aligned String formatInfo = column1Format + " " + column2Format; return String.format(formatInfo, item, formattedPrice); }
No branches or pull requests
")
The text was updated successfully, but these errors were encountered: