Package | ardisia.components.barCode.specifications |
Class | public class Code128 |
Inheritance | Code128 Object |
Code set A - alphanumeric data with uppercase letters only and non-typeable control codes.
Code set B - alphanumeric data with upper/lowercase letters, numeric, and punctuation.
If a code set is not specified, the output will default to a Code set B output. Note, this class does not enforce that only legal characters are encoded. Up to the developer. Also, does not support type mixing in a single string.
Quiet zone should be 10 times the width of a line. Not added automatically by this class.
Method | Defined By | ||
---|---|---|---|
encodeForCode128(data:String, type:String = B):String [static]
Encodes a string for the Code 128 specification. | Code128 |
Method | Defined By | ||
---|---|---|---|
getCheckSymbol(data:String, type:String = B):String [static]
Calculates and returns the check symbol. | Code128 | ||
getIndex(symbol:String):int [static]
Returns the index in the encoding array that the passed symbol
is defined. | Code128 |
encodeForCode128 | () | method |
public static function encodeForCode128(data:String, type:String = B):String
Encodes a string for the Code 128 specification.
If no code set is provided, a default of "B" will be used.
Parameters
data:String — the string to encode
| |
type:String (default = B ) — the Code set to use "A" or "B"; defaults to "B"
|
String — a String of encoded data
|
getCheckSymbol | () | method |
protected static function getCheckSymbol(data:String, type:String = B):String
Calculates and returns the check symbol. See http://en.wikipedia.org/wiki/Code_128#Conversion_To_Char for the methodology
Parameters
data:String | |
type:String (default = B )
|
String — a String of the check symbol
|
getIndex | () | method |
protected static function getIndex(symbol:String):int
Returns the index in the encoding array that the passed symbol is defined.
Parameters
symbol:String — the symbol to search for in the digitEncoding array
|
int — the int index, -1 if not found
|