Code128Symbol
An encoded GS1-128 symbol.
Draw it from widths (or toModules) at a whole number of pixels or printer dots per module, with at least Gs1Code128.QUIET_ZONE_MODULES light modules on each side.
Properties
Link copied to clipboard
GS1 data characters, separators included (the limit is Gs1Code128.MAX_DATA_CHARACTERS).
Link copied to clipboard
Human readable interpretation to print near the bars, e.g. (01)09501101020917(10)ABC123.
Link copied to clipboard
Width of the symbol in modules, quiet zones excluded.
Functions
Link copied to clipboard
Largest module width (mm) that keeps the symbol within Gs1Code128.MAX_LENGTH_MM.
Link copied to clipboard
One entry per module, true for dark (bar), with quietZone light modules on each side.
Link copied to clipboard
fun Code128Symbol.toSvg(moduleSize: Double = 2.0, unit: String = "", barHeight: Int = 60, quietZone: Int = Gs1Code128.QUIET_ZONE_MODULES, humanReadable: Boolean = true, fontSize: Int = 8, fontFamily: String = "monospace", darkColor: String = "#000000", lightColor: String? = "#ffffff"): String
Renders the symbol as an SVG document.