star-micronics / StarXpand-SDK-Android

StarXpand SDK for Android is a software development kit for supporting application development for Star Micronics devices.
https://star-m.jp/starxpandsdk-oml.html
Other
13 stars 1 forks source link

actionPrintText will append 'U@' at the beginning #25

Closed c19354837 closed 1 week ago

c19354837 commented 4 months ago

Description

image

Your device where the bug occurs

Your printer

Your development environment

The result of executing the command ver on Windows, sw_vers on macOS, uname –a on Linux, or these equivalent commands.

To Reproduce

Steps to reproduce the behavior:

  1. run the demo
  2. comment the logo print
  3. click print

Expected behavior

without 'U@'

Tatsuki-Yamamoto2731 commented 4 months ago

@c19354837 We have never evaluated our software on Xiaomi HyperOS, therefore, I think it is difficult for us to recreate the problem on our side. So, I would like to confirm more information about this issue.

My understanding: On Xiaomi HyperOS, when a logo is added on the top of a receipt, there will be no problem. However, when a logo is NOT added on the top of a receipt, 'U@' will be printed at the beginning, and "styleAlignment(Alignment.Center)" will not work.

My understanding is correct?

And regarding your photo, "without logo" receipt is created by removed (commented out) "actionPrintImage()" intentionally?

c19354837 commented 4 months ago

@Tatsuki-Yamamoto2731 Yes, the align is OK, just the 'U@' is wired. Remove PrintingActivity.kt#L92 , 'U@' will come out.

I've tested in other devices, get same result: image

Tatsuki-Yamamoto2731 commented 4 months ago

@c19354837 Thank you for your answer. It seems that the issue is caused on various Android-based OS. Maybe it is related to printer settings. Then, could you please do self-printing and take the photo? From self-printing, you can see printer setting information.

How to do self-printing: Turn the power ON, while holding down the switch, with the cover closed.

Tatsuki-Yamamoto2731 commented 1 week ago

Not updated for more than 3 months, therefore I closed this issue. If you still have the same issue, please reopen this issue.