kbarcode - The Barcode Solution for KDE

kbarcode has right now support following barcodes. Please check the requirements and limitations:

- ean (EAN 8 or EAN 13)
- upc (UPC-A or UPC-E)
- isbn
- code39
- code128
- code128c
- code128b
- Interleave 2 of 5
- code 128 raw
- Codabar
- msi
- Plessey
- code93

EAN 8:

kbarcode Setting | ean
valid character set | numbers (0....9)
lenght | 7 + 1 Checkum Digit = 8
Checksum | when the number is 7 digits long, kbarcode will create a checksum (the 8. digits) when the number is 8 digits long, kbarcode will check the checksum and deny printing if wrong
Size | fixed, but scalable Standard: 26.73mm x 21.64mm
Remark | possible scaling:
Size | Factor | width [mm] | height [mm]
SC0 | 0.818 | 21.87 | 17.70
SC1 | 0.90 | 24.06 | 19.48
SC2 | 1.00 | 26.73 | 21.64
SC3 | 1.10 | 29.40 | 23.80
SC4 | 1.20 | 32.08 | 25.97
SC5 | 1.35 | 36.09 | 29.21
SC6 | 1.50 | 40.10 | 32.46
SC7 | 1.65 | 44.10 | 35.71
SC8 | 1.85 | 49.45 | 40.03
SC9 | 2.00 | 53.46 | 43.28

TOP

EAN 13:

kbarcode Setting | ean
valid character set | numbers (0.....9)
lenght | 12 + 1 checksum digitt = 13
Checksum | when the number is 12 digits long, kbarcode will create a checksum (the 13. digits) when the number is 13 digits long, kbarcode will check the checksum and deny printing if wrong
Size | fixed, but scalable Standard: 37.29 x 26.26mm
Remark | possible scaling:
Size | Factor | width [mm] | height [mm]
SC0 | 0.818 | 30.50 | 21.48
SC1 | 0.90 | 33.56 | 23.63
SC2 | 1.00 | 37.29 | 26.26
SC3 | 1.10 | 41.02 | 28.89
SC4 | 1.20 | 44.75 | 31.51
SC5 | 1.35 | 50.34 | 35.45
SC6 | 1.50 | 55.94 | 39.39
SC7 | 1.65 | 61.35 | 43.33
SC8 | 1.85 | 68.99 | 48.58
SC9 | 2.00 | 74.58 | 52.52

TOP

UPC-A

kbarcode Setting | UPC
valid character set | numbers (0....9)
lenght | 11 + 1 checksum digit = 12
Checksum | when the number is 11 digits long, kbarcode will create a checksum (the 12. digits) when the number is 12 digits long, kbarcode will check the checksum and deny printing if wrong
Size | fixed, but scalable Standard: 37.29 x 26.26mm
Remark |
Size | Factor | width [mm] | height [mm]
SC0 | 0.818 | 30.50 | 21.48
SC1 | 0.90 | 33.56 | 23.63
SC2 | 1.00 | 37.29 | 26.26
SC3 | 1.10 | 41.02 | 28.89
SC4 | 1.20 | 44.75 | 31.51
SC5 | 1.35 | 50.34 | 35.45
SC6 | 1.50 | 55.94 | 39.39
SC7 | 1.65 | 61.35 | 43.33
SC8 | 1.85 | 68.99 | 48.58
SC9 | 2.00 | 74.58 | 52.52

TOP

UPC-E

kbarcode Setting | upc
valid character set | numbers (0....9)
lenght | Systemcode 0 + 6 + 1 Checkum Digit = 8
Checksum | when the number is 7 digits long, kbarcode will create a checksum (the 8. digits) when the number is 8 digits long, kbarcode will check the checksum and deny printing if wrong
Size |
Remark |

TOP

ISBN

kbarcode Setting | ISBN
valid character set |
lenght |
Checksum |
Size |
Remark | ISBN numbers are encoded as EAN-13 symbols, with an optional add-5 trailer. The ISBN frontend of the library accepts real ISBN numbers and deals with any hyphen and, if present, the ISBN checksum character before encoding data. Valid representations for ISBN strings are for example: "1-56592-292-1", "3-89721-122-X" and "3-89721-122-X 06900".

TOP

code 128-B

kbarcode Setting | code 128-B
valid character set |
lenght |
Checksum |
Size |
Remark | This encoding can represent all of the printing ASCII characters, from the space (32) to DEL (127). The checksum digit is mandatory i n this encoding.

TOP

code 128-C

kbarcode Setting | code 128-C
valid character set |
lenght |
Checksum |
Size |
Remark | The "C" variation of Code-128 uses Code-128 symbols to represent two digits at a time (Code-128 is made up of 104 symbols whose interpretation is controlled by the start symbol being used). Code 128-C is thus the most compact way to represent any even number of digits. The encoder refuses to deal with an odd number of digits because the caller is expected to provide proper padding to an even number of digits. (Since Code-128 includes control symbols to switch charset, it is theoretically possible to represent the odd digit as a Code 128-A or 128-B symbol, but this tool doesn't currently implement this option).

TOP

code 128 raw

kbarcode Setting | code 128 raw
valid character set |
lenght |
Checksum |
Size |
Remark | Code-128 output represented symbol-by-symbol in the input string. To override part of the problems outlined below in specifying code128 symbols, this pseudo-encoding allows the used to specify a list of code128 symbols separated by spaces. Each symbol is represented by a number in the range 0-105. The list should include the leading character.The checksum and the stop character are automatically added by the library. Most likely this pseudo-encoding will be used with BARCODE_NO_ASCII and some external program to supply the printed text.

TOP

code 39

kbarcode Setting | code 39
valid character set |
lenght |
Checksum |
Size |
Remark | The code-39 standard can encode uppercase letters, digits, the blank space, plus, minus, dot, star, dollar, slash, percent. Any string that is only composed of such characters is accepted by the code-39 encoder. To avoid loosing information, the encoder refuses to encode mixed-case strings (a lowercase string is nonetheless accepted as a shortcut, but is encoded as uppercase).

TOP

interleaved 2 of 5

kbarcode Setting | interleaved 2 of 5
valid character set |
lenght |
Checksum |
Size |
Remark | This encoding can only represent an even number of digits (odd digits are represented by bars, and even digits by the interleaving spaces). The name stresses the fact that two of the five items (bars or spaces) allocated to each symbol are wide, while the rest are narrow. The checksum digit is optional (can be disabled via BARCODE_NO_CHECKSUM). Since the number of digits, including the checksum, must be even, a leading zero is inserted in the string being encoded if needed (this is specifically stated in the specs I have access to).

TOP

code 128

kbarcode Setting | code 128
valid character set |
lenght |
Checksum |
Size |
Remark | Automatic selection between alphabet A, B and C of the Code-128 standard. This encoding can represent all ASCII symbols, from 0 (NUL) to 127 (DEL), as well as four special symbols, named F1, F2, F3, F4. The set of symbols available in this encoding is not easily represented as input to the barcode library, so the following convention is used. In the input string, which is a C-language null- terminated string, the NUL char is represented by the value 128 (0x80, 0200) and the F1-F4 characters are represented by the values 193-196 (0xc1-0xc4, 0301-0304). The values have been chosen to ease their representation as escape sequences. Since the shell doesn't seem to interpret escape sequences on the command line, the "-b" option cannot be easily used to designate the strings to be encoded. As a workaround you can resort to the command echo, either within back-ticks or used separately to create a file that is then fed to the standard-input of barcode - assuming your echo command processes escape sequences. The newline character is especially though to encode (but not impossible unless you use a csh variant. These problems only apply to the command-line tool; the use of library functions doesn't give any problem. In needed, you can use the "code 128 raw" pseudo-encoding to represent code128 symbols by their numerical value. This encoding is used late in the auto- selection mechanism because (almost) any input string can be represented using code128.

TOP

Codabar

kbarcode Setting | Codabar
valid character set |
lenght |
Checksum |
Size |
Remark | Codabar can encode the ten digits and a few special symbols (minus, plus, dollar, colon, bar, dot). The characters "A", "B", "C" and "D" are used to represent four different start/stop characters. The input string to the barcode library can include the start and stop characters or not include them (in which case "A" is used as start and "B" as stop). Start and stop characters in the input string can be either all lowercase or all uppercase and are always printed as uppercase.

TOP

Plessey

kbarcode Setting | Plessey
valid character set |
lenght |
Checksum |
Size |
Remark | Plessey barcodes can encode all the hexadecimal digits. Alphabetic digits in the input string must either be all lowercase or all uppercase. The output text is always uppercase.

TOP

MSI

kbarcode Setting | MSI
valid character set |
lenght |
Checksum |
Size |
Remark | MSI can only encode the decimal digits. While the standard specifies either one or two check digits, the current implementation in this library only generates one check digit.

TOP

code 93

kbarcode Setting | code 93
valid character set |
lenght |
Checksum |
Size |
Remark | The code-93 standard can natively encode 48 different characters, including uppercase letters, digits, the blank space, plus, minus, dot, star, dollar, slash, percent, as well as five special characters: a start/stop delimiter and four "shift characters" used for extended encoding. Using this "extended encoding" method, any standard 7-bit ASCII character can be encoded, but it takes up two symbol lengths in barcode if the character is not natively supported (one of the 48). The encoder here fully implements the code 93 encoding standard. Any characters natively supported (A-Z, 0-9, ".+-/$&%") will be encoded as such - for any other characters (such as lower case letters, brackets, parentheses, etc.), the encoder will revert to extended encoding. As a note, the option to exclude the checksum will eliminate the two modulo-47 checksums (called C and K) from the barcode, but this probably will make it unreadable by 99% of all scanning systems. These checksums are specified to be used at the firmware level, and their absence will be interpreted as an invalid barcode.

TOP