encode

fun encode(message: Gs1Message, shape: DataMatrixShape = DataMatrixShape.SQUARE, size: DataMatrixSize? = null): DataMatrixSymbol(source)

Encodes message in the smallest symbol of the allowed shape, or in exactly size when given.

Throws

with Gs1ErrorCode.DATA_MATRIX_TOO_LONG if the data does not fit.