star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
91 stars 55 forks source link

SM-S230i model doesn't react on Alignment.Center for printing QR code action #119

Open aleks-khomenko opened 3 months ago

aleks-khomenko commented 3 months ago

Description

Hello guys. Thank you so much for your hard work. I copied code from your example but .styleAlignment(StarXpandCommand.Printer.Alignment.Center) has no effect on QR and barcode position. According to the doc SM-S230i is support Alignment, right?

Your device where the bug occurs

Your printer

Your development environment

ProductName: macOS ProductVersion: 14.5 BuildVersion: 23F79

Additional context

IMG_6389 IMG_6390

can-miki commented 2 months ago

Sorry for the late reply. Please refer to the note of styleAlignment

In SM-S210i(ESC/POS), SM-S230i(ESC/POS), SM-T300i(ESC/POS), SM-T300(ESC/POS), SM-T400i(ESC/POS), this function is effective only for text data. All other data is fixed to left-justified.

The default setting for SM-S230i emulation is ESC/POS. Could you please try changing the emulation to StarPRNT. Please refer to the product specifications for information on how to change emulation settings. Below are the steps quoted from the product specifications:

Simple method of switching over between ESC/POS and StarPRNT emulation modes

  1. Turn the printer power and open the printer cover.
  2. Press and hold the POWER button and the FEED button simultaneously. As soon as the ERROR lamp flashes five times, release the buttons. The emulation switchover takes place automatically.
  3. After setting a paper, close the printer cover. The set emulation mode is printed out. ESC/POS mode: EMU = ESC/POS Star Line mode: EMU = StarPRNT If the emulation mode is not switched correctly, repeat the above steps 1 to 3. At that time, in step 2, make sure not to release the buttons until the lamp completes the 5th flash.
  4. Please reboot the printer after switching the emulation between StarPRNT and ESC/POS. *It will be valid after rebooting the printer.