StarXpand SDK for iOS/Android Developer's Manual Ver. 1.14.0

Last update: Sep. 15, 2026

Use Customer Display

The procedure and the reference vary depending on the OS. Select the OS to display.

iOS Android


This section describes the structures of StarPRNT SDK and StarXpand SDK for customer display operations.

Understand the differences between these SDKs before migrating to StarXpand SDK.


StarPRNT SDK

To control the customer display connected to the printer, use the ISDCBBuilder class to generate control commands.
To display characters, there is a need to use the appendBytes() method of this class to add character data. In this case, specify a character code value, instead of a string, as shown below:
let pattern: [UInt8] = [0x48, 0x65, 0x6c, 0x6c, 0x6f]   // Display data: "Hello"
builder.appendBytes(pattern, length: UInt(pattern.count))

Refer to ISDCBBuilder for other functions. Finally, retrieve the control commands from the passThroughCommands property and use the write() method of the SMPort class to send them to the printer.


StarXpand SDK

To display text on the customer display, use the addDisplay() method of the DocumentBuilder class to add a text display command to the document. Specify the text to be displayed as a string value in the argument to the actionShowText() method of the DisplayBuilder class.
Refer to DisplayBuilder for other DisplayBuilder functions.
Finally, as with printing data, use the getCommands() method of the StarXpandCommandBuilder class to retrieve display control data and use the print() method of the StarPrinter class to send it to the printer.

Refer to Supported API List for information on whether each API is supported in StarPRNT SDK and StarXpand SDK.

This section describes the structures of StarPRNT SDK and StarXpand SDK for customer display operations.

Understand the differences between these SDKs before migrating to StarXpand SDK.


StarPRNT SDK

To control the customer display connected to the printer, use the IDisplayCommandBuilder class to generate control commands.
To display characters, there is a need to use the appendBytes() method of this class to add character data. In this case, specify a character code value, instead of a string, as shown below:
val pattern = byteArrayOf(0x48, 0x65, 0x6c, 0x6c, 0x6f)  // Display data: "Hello"
builder.appendBytes(pattern, pattern.size)

Refer to IDisplayCommandBuilder for other functions.
Finally, retrieve the control commands from the getPassThroughCommands() method and use the writePort() method of the StarIOPort class to send them to the printer.


StarXpand SDK

To display text on the customer display, use the addDisplay() method of the DocumentBuilder class, which was used in Generate Printing Data, to add a text display command to the document. Specify the text to be displayed as a string value in the argument to the actionShowText() method of the DisplayBuilder class.
Refer to DisplayBuilder for other DisplayBuilder functions.
Finally, as with printing data, use the getCommands() method of the StarXpandCommandBuilder class to retrieve display control data and use the printAsync() method of the StarPrinter class to send it to the printer.

Refer to Supported API List for information on whether each API is supported in StarPRNT SDK and StarXpand SDK.