Home
ezBarcode Component WinForm Prev Page Prev Page
ezBarcodeComponent Winform
Getting Started
Setup ezBarcodeComponent
Examples
Trial and Redistributables
FAQ
ezBarcodeComponent Symbologies
CodaBar
Code11
Code128
Code39
Code39Ext
Code93
Code93Ext
Ean13
Ean8
Industrial 2 of 5
Interleaved 2 of 5
Ucc/Ean 128
MSI
Postnet
Planet
Telepen
Upc A
Upc E
IntelligentMail
Sscc18
Scc14
Itf 14
PDF 417
Macro PDF 17
DataMatrix
QR Code
ezBarcodeComponent.Winform Reference
Barcode Class
Barcode Members
Barcode Constructor
Properties
AutoFitControlToBarcode Property
BackColor Property
BarHeight Property
BearerBarHorizontalWidth Property
BearerBarVerticalWidth Property
Caption Property
CaptionAlignment Property
CaptionColor Property
CaptionFont Property
CaptionPosition Property
CaptionSpace Property
CharacterGrouping Property
CheckCharacter Property
CheckCharacterInText Property
CODABARStartChar Property
CODABARStopChar Property
Code128Set Property
CodeData Property
DataMatrixBarSize Property
DataMatrixEncodingMode Property
DataMatrixPreferredFormat Property
Font Property
ForeColor Property
HumanReadableTextFontColor Property
HumanReadableTextPosition Property
IsHumanReadableTextOnTop Property
LeftMargin Property
MacroPdf417FileId Property
MacroPdf417SegmentCount Property
MacroPdf417SegmentIndex Property
NarrowToWideRatio Property
PDF417BarWidth Property
PDF417Columns Property
PDF417CompactionType Property
PDF417ErrorCorrectionLevel Property
PDF417Rows Property
PDF417Truncated Property
PDF417YtoXRatio Property
Picture Property
PostnetHeightShort Property
PostnetHeightTall Property
PostnetSpacing Property
QRCodeBarSize Property
QRCodeEncoding Property
QRCodeErrorCorrectionLevel Property
QRCodeVersion Property
Resolution Property
RotationAngle Property
ShowHumanReadableText Property
SupplementarySeparation Property
Symbology Property
TopMargin Property
UPCESystem Property
UseCaret Property
XDimension Property
Methods
Dispose Method
OnPaint Method
DrawOnGraphics Method
SaveImageAs Method
CaptionPosition Enumeration
Code128 Enumeration
DataMatrixEncodingModes Enumeration
DataMatrixPreferredFormats Enumeration
PDF417CompactionMode Enumeration
PDF417ErrorCorrection Enumeration
QRCodeEncoding Enumeration
QRCodeErrorCorrectionLevel Enumeration
QRCodeVersion Enumeration
RotationAngles Enumeration
Symbologies Enumeration
ezBarcodeComponent Help

Code 39 Specification



Code 39, also known as ANSI/AIM Code 39, USS Code 39, Code 3 of 9, is a discrete, variable-length symbology. Code 39 is an alphanumeric bar code. The symbol can be as long as necessary to store the encoded data. It is designed to encode 26 uppercase letters, 10 digits and 7 special characters. It can be extended to code all 128 ASCII characters by using a two character coding scheme.

Encoding
Code 39 is called code 39 or three of nine because each character encoded is made up of 5 bars and 4 spaces for a total of 9 elements and 3 out of 9 element are always wide.

Check Sum
In applications that require very high level of accuracy a modulo 43 check sum digit is appended to the last character.

Code 39 Character Set
Code 39 starts with '*' and stops with '*'. Code39 is designed to encode 26 upper case letters, 10 digits and 7 special characters:
Char Pattern
b s b s b s b s b
Char Pattern
b s b s b s b s b
0 n n n w w n w n n M w n w n n n n w n
1 w n n w n n n n w N n n n n w n n w w
2 n n w w n n n n w O w n n n w n n w n
3 w n w w n n n n n P n n w n w n n w n
4 n n n w w n n n w Q n n n n n n w w w
5 w n n w w n n n n R w n n n n n w w n
6 n n w w w n n n n S n n w n n n w w n
7 n n n w n n w n w T n n n n w n w w n
8 w n n w n n w n n U w n n n n n n w w
9 n n w w n n w n n V n w w n n n n n w
A w n n n n w n n w W w w w n n n n n n
B n n w n n w n n w X n w n n w n n n w
C w n w n n w n n n Y w w n n w n n n n
D n n n n w w n n w Z n w w n w n n n n
E w n n n w w n n n - n w n n n n w n w
F n n w n n w n n w . w w n n n n w n n
G n n n n n w w n w SP n w w n n n w n n
H w n n n n w w n n * n w n n w n w n n
I n n w n n w w n n $ n w n w n w n n n
J n n n n w w w n n / n w n w n n n w n
K w n n n n n n w w + n w n n n w n w n
L n n w n n n n w w % n n n w n w n w n

Code 39 Extended: The code 39 symbology can be extended to encode all 128 characters in the ASCII table. In the full ASCII mode, the symbols $ / % and + are used as precedence codes with the 26 letters as shown below. Since the same symbol now can be interpreted as one character in Extended Code 39 mode and two characters in Code 39 mode, the readers must be set to extended mode to read the data correctly.

Code 39 examples by using ezBarcodeComponent
[C#]

        using ezBarcodeComponent.Winform; 

        //create barcode class
        Barcode barcode1 = new Barcode(); 
                                                                        
        //Specify the CodeData to encode
        barcode1.CodeData = "0123456789";
        //Set the Symbology to Code39
        barcode1.Symbology = Symbologies.Code39;
   barcode1.CheckCharacter= true;
    barcode1.CheckCharacterInText = true;

   //Save the image
        barcode1.SaveImageAs("code39.gif", System.Drawing.Imaging.ImageFormat.Gif);


[Vb.net]
      'create barcode class
        Dim barcode1 As New Barcode
                                                                
        'Specify the CodeData to encode 
        barcode1.CodeData = "0123456789"
        'Set the Symbology to Code39
 barcode1.Symbology = Symbologies.Code39
        barcode1.CheckCharacter= True
    barcode1.CheckCharacterInText = True

   'Save the image  
        barcode1.SaveImageAs("code39.gif", System.Drawing.Imaging.ImageFormat.Gif)
                        
Example of Code 39 barcode images.   The last digit 2 is the check sum digit.