What is the maximum length of a Code 128 barcode?
Asked Answered
N

1

20

I need to create a Code 128 barcode with a maximum of 44 characters. What is the maximum number of characters supported by the Code 128 barcode format?

I came to know that Code 128 can encode all 128 characters of ASCII, but I cannot determine the maximum number of characters it supports.

Nadene answered 17/6, 2014 at 12:0 Comment(3)
duplicate: https://mcmap.net/q/663006/-barcode-field-lengthCairngorm
But i need a clear answerNadene
Code 128 with this length becomes very unpractical because it gets very long (harder to scan, print). Maybe think of different more compact barcode types eg. 2d qrJablon
A
35

The specification for Code 128 (ISO/IEC 15417) leaves the maximum length undefined and states that this is something that should be defined by any derivative application[*] standard:

4.7.1 Symbology and data characteristics

Application specifications should consider the following parameters.

b) The number of data characters in the symbol, which may be fixed, variable or variable up to a defined maximum.

For example the GS1 General Specification define that GS1-128 (the formal application of Code 128 to the supply chain industry) has a limits of 48 characters per symbol:

5.4.1 GS1-128 Bar Code Symbol size characteristics:

The characteristics of the GS1-128 Symbology are:

  • GS1-128 Bar Code Symbol size characteristics:

    • The maximum number of data characters in a single symbol is 48.

Practically one should restrict the number of characters to whatever fits comfortably in a scanner's field of view. This will vary depending on the type and model of the device, e.g. handheld vs fixed, laser vs CCD, high-end vs budget, etc. In uncontrolled or open environments a high degree of tolerance should be budgeted for.

It is especially worth noting that Code 128 supports double-density compression of numeric data ("mode C") which makes encoding long strings of digits much more efficient.

Here is a 44-digit Code 128 containing 12345678901234567890123456789012345678901234:

44-digit Code 128

This is appropriately sized for most practical applications.

However, here is the same Code 128 this time containing 44 alpha characters ABCDEFGHIJABCDEFGHIJABCDEFGHIJABCDEFGHIJABCD:

44-alpha character Code 128

A barcode of this size will not be useful in as many applications since reading this reliably would require a scanner with a high resolution and wide field-of-view.

So ultimately the maximum length of a Code 128 is dependant not only on the practical constraints of the application but also the type of data to be encoded.

[*] Application is the industry term referring to the environment and processes in which the barcode system is to be used, rather than any specific software application.

Adair answered 11/7, 2015 at 17:32 Comment(2)
can you please tell me how to generate type c code128 barcode. I need bytecodes for type c.Ada
@ShreenivasChikati Using what library? If you mean generically then it seems like this deserves a question of its own.Adair

© 2022 - 2024 — McMap. All rights reserved.