encode

open override fun encode(contents: String): BooleanArray

Encode the contents to boolean array expression of one-dimensional barcode. Start code and end code should be included in result, and side margins should not be included.

Return

a boolean[] of horizontal pixels (false = white, true = black)

Parameters

contents

barcode contents to encode


open override fun encode(contents: String, hints: Map<EncodeHintType, *>?): BooleanArray

Can be overwritten if the encode requires to read the hints map. Otherwise it defaults to encode.

Return

a boolean[] of horizontal pixels (false = white, true = black)

Parameters

contents

barcode contents to encode

hints

encoding hints