.NET Barcode for WinForms          ASP.NET Barcode          .NET Barcode Reader          Java Barcode          Java Barcode Reader
Avapose > Code 128 Introduction > Code 128 Size Setting

Code 128 Size Setting

Code 128 Generator Size Setting, Generate Code 128 in C#, ASP.NET, VB.NET applications

Size setting overview
This page is on size setting of Code 128, emphasizing 2 important factors: barcode width and height.

Barcode structure
The components of code 128 barcode are Quiet zone, Start character, Data characters, Check digit, Stop character and Quiet zone.


Code 128 Size Setting

Barcode Width:
The W (measured in pixel), including quiet zones, can be calculated from the following expression:

Code 128


W
= 11 X (C+ D/2 ) + 2Q + 2 X

W: the width of Code 128.
C: the number of start, special, symbol check and stop
characters plus the number of the data characters not
included in D
X: width of a module bar; X min=1 pixel
Q: width of the quiet zone; Q min=10X
D: number of numeric data characters encoded in double density (Code Set C)


Barcode Height:

The Code 128 barcodeHeight, H (measured in pixel) can be calculated from the following expression:

Code 128




There are no rigid requirements for the height of Code 128 in ISO/IEC 15417:2007 (E). However, it is recommended for manual scanning that the minimum bar height, i.e. the Y Dimension, should be 5 mm or 15% of the symbol length, whichever is greater.

For more details on Code 128 size setting, please go through the below guide: