star-micronics / react-native-star-io10

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

Two Colour Printing with SP700 #111

Closed blah-kohte closed 3 months ago

blah-kohte commented 4 months ago

Description

I’ve thoroughly explored the StarXpand SDK and various online resources, but I haven’t discovered a straightforward method for achieving red font printing using the react-native-star-io10 library. Is it possible to print in red with this library?

Your printer

Project config:

can-miki commented 3 months ago

Printing in red on SP700 using this library can be achieved using the following methods:

styleInvert(enable: boolean)

It can also be achieved by sending raw commands using the printRawData method of the StarPrinter class.

method: printRawData(data: Array) command: Star Impact Printer Command Specifications ESC 4 :[Name] Specify white/black inversion and red color printing ESC 5 :[Name] Cancel white/black inversion/specify black color printing

Please consider one of the ways above.

blah-kohte commented 3 months ago

Thanks very much! Took me a while but I managed to figure out styleInvert(). Appreciate the additional information! 👌