Home
ezBarcode Component Web Prev Page Prev Page
ezBarcodeComponent Web Control
Getting Started
Setup ezBarcode Component
Examples
Trial and Redistributables
FAQ
ezBarcodeComponent Symbologies
CodaBar
Code 11
Code 128
Code 39
Code 39 Ext
Code 93
Code 93 Ext
Ean 13
Ean 8
Industrial 2 of 5
Interleaved 2 of 5
Ucc/Ean 128
MSI
Postnet
Planet
Telepen
Upc A
Upc E
IntelligentMail
Sscc 18
Scc 14
Itf 14
PDF 417
Macro PDF 417
DataMatrix
QR Code
ezBarcodeComponent.Web
Barcode Class
Barcode Members
Barcode Constructor
Properties
BarcodeImageFormat 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
HumanReadableTextFontColor Property
HumanReadableTextPosition Property
IsHumanReadableTextOnTop Property
LeftMargin Property
MacroPdf417FileId Property
MacroPdf417SegmentCount Property
MacroPdf417SegmentIndex 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
WideToNarrowRatio Property
XDimension Property
Methods
Render Method
SaveImageAs Method
BarcodeImageFormat Enumeration
CaptionPosition Enumeration
Code128 Enumeration
DataMatrixEncodingModes Enumeration
DataMatrixPreferredFormats Enumeration
ImageGen Class
ImageGen Members
ImageGen Constructor
Properties
IsReusable Property
Methods
ProcessRequest Method
PDF417CompactionMode Enumeration
PDF417ErrorCorrection Enumeration
QRCodeEncoding Enumeration
QRCodeErrorCorrectionLevel Enumeration
QRCodeVersion Enumeration
RotationAngles Enumeration
stringProcess Class
stringProcess Members
stringProcess Constructor
Methods
DecodeString Method
EncodeString Method
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.