Copyright: ® dLSoft 1994-5


Help Contents
Contents

Barcode Types

Introduction

General points

Barcode types

Notes on Metafiles


Introduction

DLSoft products support a wide range of barcode types and we endeavour to keep up to date with barcode specifications. However, it is important to understand that the standards specified for barcodes have arisen from a wide range of sources, and some barcode specifications have been modified over a period of time. Furthermore some barcode types have been largely superceded by more modern code types, usually because modern types have a higher reliablility.

In these notes we aim to provide:

1) details of the barcode types supported in the version of the DLL/VBX which bears the same date as this file,

2) some general information about the codes you need to provide to produce satisfactory barcode images

3) the code # numbers required to access the barcode types if you are programming the DLL library directly or using the VBX, OCX or OLE wrappers to access the barcodes. Programmers who are using multiple code types are advised to print out the code type table.


General points

Several fundamental characteristics of barcodes need to be understood by users of dLSoft barcode products:

1. The thickness of bars in barcodes is important. dLSoft barcode products will refuse to create a barcode image if the bar thickness within the metafile becomes too small. However, even when dLSoft barcode products creates an image you may resize it within another application so that when it is printed by the other application its lines may too small for the printer's resolution. Consequently it is essential that you check that a printed barcode is readable using an appropriate scanner or reader.

Barcodes printed by laser printer will, in general, be printed correctly, but codes printed by matrix printers must be reproduced at a large enough scale that the barcodes unit size is at least as large as the printer's pins.

Bar reduction: All DLSoft barcode products allow the thickness of bars to be reduced (for example to allow for ink spread during wet ink printing processes), but this adustment should only be made when the knowledge of the extent of reduction required is available. Random guesses usually produce unreadable images!

2.  Many barcode types may use codes only of a specific length. (e.g. EAN13 requires 13 digits in the code). Some barcode type use specific digits of the code as a checksum - so not every combination of digits can form a legal barcode. dLSoft barcode products can optionally calculate checksum digits, requiring only the other digits to be entered by the user. Furthermore most coding schemes are limited to 32 characters or less.

3. The barcode type are supported in this release are shown in the barcodes table below. If you plan to use a specific barcode type you should examine the notes on that type before printing any barcode images.

4. Users should be aware that it is possible to generate barcodes of a specific type and find that normal retail scanners are unable to decode the images. This does not necessarily mean that there is anything wrong with the barcode image. Most scanners aimed at the retail market are not programmed to interpret barcode codes reserved for other (eg. military) use.

5. The Extra options. All of our products which use the DLSBAR barcode library provide access to two options not detailed in the product manuals. These are the options EXTRA1 and EXTRA2, which may appears as checkboxes in dialogs, or as additional bit flags in the VBX, DLL or OCX. These options are used only for a limited number of barcodes which have "unusual" features. The effect of these options is described under the barcode types which use them. For all other barcode types these options may be ignored or set to 0.


Barcode types

In the table below the types of barcodes supported by this release of the library are summarised, together with the type and number of characters which are specified for that barcode type. In this connection "any" means capital letter and number characters; in some cases additional characters are defined, but lower case letters are not permitted.

Telepen provides codes for upper and lower case letters and most printable characters. Only Extended Code 39 and the EAN 128 and Code 128 codes provide bars for the full ASCII character set.

There are many named barcode types which are actually derivatives of major types. To avoid the table (and user-programming) becoming excessively complex, both the table and calls to the library report only the generic name.

For example: The ISBN, ISSN and JAN coding scheme are all variants of the EAN scheme.

There are several coding schemes (such as DEFCON) which are actually Code 39, and some countries use Code 128 under other names for mail tracking (as in the UK).

Types supported

code#	Code type	no. of characters	check digit
0	EAN13	13 numbers	1
1	EAN-8	8 numbers
2	EAN13+2	15 numbers	1
3	EAN13+5	18 numbers	1
4	UPC-A	12 numbers	1
5	UPC-E	7 numbers	1
6	ITF-14	14 numbers	1 (EAN optional)
7	ITF-6	6 numbers
8	Code 39	any	1 optional
9	Code 128	any*	automatic
10	EAN-128	any*	automatic
11	2 of 5	any numbers
12	I-2 of 5	number pairs	1 optional
13	3 of 9	any
14	Code B	any numbers
15	Code 11	any	1 or 2
16	Codabar	any
17	MSI	any numbers	1 or 2
18	Ext. Code 39	any (full ASCII)	1 optional
19	UPCA+2	14 numbers	1
20	UPCA+5	17 numbers	1
21	EAN8+2	10 numbers	1
22	EAN8+5	13 numbers	1
23	UPCE+2	9 numbers	1
24	UPCE+5	12 numbers	1
25	Telepen numeric	any	1 optional
26	Telepen ASCII	any	1 optional
27	Telepen begin numeric end	any	1 optional
28	PostNet type A	5 numbers	1
29	PostNet type C	9 numbers	1
30	PostNet type C'	11 numbers	1
31	FIM A	fixed code	0
32	FIM B	fixed code	0
33	FIM C	fixed code	0
34	RM4SCC	any	1
35	4-State	any	1 optional
36	Code 93	any	2 optional
37	Ex Code 93	any (full ASCII)	2 optional
38	ISBN	9/10 digit ISBN	1 automatic
39	SISAC	SICI codes	1
More:

EAN

ISBN

ISSN

JAN

Codabar

Telepen

Code 128 & EAN128

UPC

ITF

2 of 5

I-2 of 5

Code B

Code 39

Code 93

Code 11

MSI

PostNet

RM4SCC

4 State

SISAC

Location numbering


EAN

EAN-13 is the main scheme used throughout Europe for retail article numbering. It is a numeric only coding scheme. The > symbol in the right margin is a light margin indicator. In the left margin the first code digit is used as the margin indicator. No other marking should appear in the light margins.

EAN codes require 13 digits (12 if the check digit is calculated automatically. Numbers used for EAN article numbering are assigned by the country's Article Number Association (the ANA in the UK).

EAN codes may contain 2 or 5 digit supplementaries:

The ISBN coding scheme is EAN13, with the first three digits being 978, and 9 digits the ISBN number of the book (without check digit). The final digit is the EAN calculated check digit.

The ISSN coding scheme is EAN13, with the first three digits being 977, 7 digits showing the ISSN number of the periodical (without check digit), and 2 spare digits (used in the UK to indicate price code changes). The final digit is the EAN calculated check digit.

The JAN coding scheme is EAN13 with the first two digits being 49.

Note that there is not a one to one correspondence between bars and the code numbers.

EAN-8 is a smaller and shortened version of the EAN code.

EAN-8 requires 8 digits (7 if the check digit is calculated automatically), and support 2 and 5 digit supplementaries.


ISBN

The ISBN coding scheme is EAN13, with the first three digits being 978, and 9 digits the ISBN number of the book (without check digit). The final digit is the EAN calculated check digit.

Users can produce the ISBN barcode by selecting EAN as the barcode type and entering the EAN number. Alternatively the ISBN barcode complete with the ISBN text above the barcode may be obtained by selecting ISBN as the barcode type and entering the ISBN 9 or 10 digit ISBN value (which may include dashes, eg. 1-2345-6789-1). The barcode image which results is as shown below.

Note that the final digit of a 10 digit ISBN number is an ISBN check digit and this is NOT included in the barcode image. The barcode image will contain the EAN chaeck digit.

The spacing of the text above the barcode may be modified by entering a character spacing value between 50 and 100%.


ISSN

The ISSN coding scheme is EAN13, with the first three digits being 977, 7 digits showing the ISSN number of the periodical (without check digit), and 2 spare digits (used in the UK to indicate price code changes). The final digit is the EAN calculated check digit.


JAN

The JAN coding scheme is EAN13 with the first two digits being 49.


Codabar

The Codabar coding scheme is a self-checking system which has 16 characters in its charcter set; the digits 0 -9, and the characters $ : / . + -. It has a choice of four start & stop characters, although some versions allow a choice of eight!. By default dLSoft barcode products uses A and C for start and stop respectively. However, by prefixing the barcode with a caret (^) and two symbols, any of the allowed Codabar characters may be used for start and stop; ie.

^AT

causes A to be used as the start character and T to be used for the stop character.

The allowed Codabar start and stop characters are: A B C D E N T *

The start and stop characters are not displayed in text form.


Telepen

The Telepen coding scheme is numeric only by default. The Telepen ASCII scheme provides the full ASCII character set. Codes below 32 (space) may be entered as <ALT>0XYZ , where XYZ is the 3 digit ASCII code +128. The extra Telepen Numeric option provides the begin data end sequence required on some systems. . The ASCII ESC character required on some Telepen Numeric systems as the first character may be obtained by checking the EXTRA1 checkbox in applications, or setting the flags parameter bit DL_FLAG_EXTRA1 (bit 4 of the flags variable) or BarCode.Extra1 in the VBX.


Code 128 & EAN128

Code 128 and EAN-128 are modern very high density coding schemes. They have three coding schemes each and permit the inclusion of special characters not present on the keyboard. If no coding scheme is specified scheme B is used by default. For EAN-128 scheme C is used for any code which has numbers in the first four digits (as recommended by the ANA). An alternative scheme may be selected by making the first character one of the start characters specified below.

The special characters may be entered as <ALT>0XYZ , where XYZ is the 3 digit ASCII code (+128 for values <32), or according to the following table:

XYZ	character	Code A	Code B	Code C
197	Å	DEL
198	Æ	func. 3	func. 3
199	Ç	func. 2	func. 2
200	È	shift	shift
201	É	code C	code C
202	Ê	code B	func. 4	code B
203	Ë	func. 4	code A	code A
204	Ì	func. 1	func. 1	func. 1
205	Í	Start A	Start A	Start A
206	Î	Start B	Start B	Start B
207	Ï	Start C	Start C	Start C
208	Ð	NUL
Code C codes only the digit pairs 00-99.

Note that EAN-128 codes have parentheses removed before coding, so ( and ) may appear in the human readable form but will be omitted from the barcode. Parentheses may not be used as part of the code data.

The majority of support calls result from users not using the correct 128 code variants (ie. A, B or C) or not being aware of which code variant a customer is expecting. Some customers expect only Code C, while others start in Code A and then switch to Code C, etc. It is important to be aware that the three code variants exist and will commonly be encountered within the same barcode. For this reason it is essential to ascertain which type the customer wants and if and where the code variant should change along the barcode.


UPC

The UPC (Universal Product Code) is widely used in the USA as a retail code. However, it has wider application and this can result in some confusion.

The actual UPC code is a 10 digit code. The 10 digit number is preceded by a "number system" digit, which is 0 for the retail version, and followed by a check digit. In many retail systems only the 10 digits of the UPC code need to be entered in the event of a mis-scan, so there have been times when the leading 0 has not been included in the human readable form. However, other values of the number system digit are used for specific purposes (eg. 6 or 7 are used for manufacturing identification numbering, 3 for drug products, etc.).

The UPC-A code is one variant of a number of 12 digit codes widely used in the USA. Retail codes are usually thought of as those with 10 digits (or 11 if the checkdigit is being entered explicitly), and in fact are 12 digit codes made up of a leading 0, followed by 10 product digits and 1 checkdigit.

The library generates the barcode images for UPC-A if the leading 0 is provided, followed by the 10 digit product code. The check digit may either be entered explicity or calculated by the library. This technique allows alternative leading digits to be used for their intended purposes. Users of such alternative codes will know what those leading digits may be, or may obtain the information from the authorised code provider.

The UPCC has produced more than one specification of the UPC codes. The current specification suggests that the country code (always 0 in the USA) and the codes checkdigit should be printed aligned with the coded digits, but in the light margins. Earlier specifications suggested that these digits should be printed in different positions or not at all.

The library offers the choice of not printing the digits or of printing them in the light margins (using the Margin Indicators ON option) for both UPC-A and UPC-E codes.

UPC codes support 2 and 5 digit supplementaries.


ITF

ITF is a larger code intended for use on the outside of packing cases and scanning a a distance. In this form it most commonly uses thae same code and EAN-13, but with a LEADING 0. If a check digit is calculated by dBarcode for this code then the EAN-13 check digit is produced.

The horizontal bars supporting the barcs of the barcode are called Bearer Bars, and these are recommended rather than mandatory.

dBarcode produces the bearer bars at the normal size recommended by the ANA (about 5 mm).  An Extra option is provided for producing the bearer bars at the minimum thickness recommended, because this is more appropriate for modern printing techniques. This is smaller than the old size (5mm) which was recommended for metal plate printing when the purpose of the bearers was to spread the load when metal printing plates were pressed onto soft surfaces. The smaller bearer bars may be obtained by checking the EXTRA1 checkbox in applications, or setting the flags parameter bit DL_FLAG_EXTRA1 (bit 4 of the flags variable) or BarCode.Extra1 in the VBX.

Similarly dBarcode does not normally include the optional H printer gauge marks (nor the accompanying extra light margin space), because these were also features of older printing technologies, designed to check for impression depth and ink spread. If the H gauges are required they may be obtained by checking the EXTRA2 checkbox in applications, or setting the flags parameter bit DL_FLAG_EXTRA2 (bit 5 of the flags variable) or BarCode1.Extra2 in the VBX.

A shortened version of this code is ITF-6

The ITF 6 code is not intended to have H gauges.

Note that these ITF codes are not the same library selection as Interleaved 2 of 5 (I-2of5)


2 of 5

2 of 5 is a numeric only coding scheme which is not very efficient.


I-2 of 5

One of the most common code outside the retail area is Interleaved 2 of 5, a high density, continuous numeric symbology which codes digit pairs. Because of this I-2 of 5 can only be used for even numbers of digits. If an odd number of digits is used in the DLSoft library a leading 0 is added automatically to the front of the number.


Code B

Code B is a "basic" numeric only code which is fairly efficient in use of space.


Code 39

Code 39 is by far the most common barcode scheme outside the retail area and is read by most scanners, although it is not as compact as Code 93 or Code 128. The normal Code 39 scheme encode both numbers and upper case letters, and was the first alphanumeric symbology:

Code 39 has an optional checkdigit.

The Extended Code 39 scheme also includes the lower case letters and much punctuation.


Code 93

Code 93 was designed to complement Code 39 and is a more compact code than the latter. The library support both the standard Code 93 (numbers and upper-case letters) and the Extended (full ASCII) Code 93.


Code 11

Code 11 is an older  numeric code which is used by a number of large organisations, but is rarely found on retail scanners.


MSI

MSI, also known as the Modified Plessey Code, is a  relatively weak code which is inefficient in use of space.

Normally this code has a single Modulo 10 check digit. However, there are two variations of a double check digit form in common use. One uses a Mod 11 check digit before the normal Mod 10 check digit, the other uses two Mod 10 check digits.

These two-checkdigit forms are accessible through the use of the Extra1 or Extra2 parameters - ie by either checking the Extra1 or Extra2 check boxes in applications, or setting the DL_FLAG_EXTRA1 (bit 4) or DL_FLAG_EXTRA2 (bit 5) flags in the DLL, or by setting the BarCode1.Extra1 or BarCode1.Extra2 parameters in the VBX. The effects are as shown below.  Note that BOTH options also require the autocheckdigit calculation to be enabled.

If Extra1 is set then a Modulo 10 check digit is calculated and inserted before the normal checkdigit.

If Extra2 is set the an Modulo 11 check digit is calculated and inserted before the normal checkdigit.

Some scanning equipment cannot read both forms. (in fact some scanning equipment cannot read either of the two checkdigit forms). Check your scanners documentation to ensure that you choose an appropriate combination. DO NOT SET BOTH Extra1 and Extra2.


PostNet

PostNet codes are the clocked codes used in the US mail system. There a three types of PostNet code (identified as A, C and C') which differ in the number of characters encoded. These codes are based on the US ZIP code system.


RM4SCC

RM4SCC the the Royal Mail (UK) version of the 4 State clocked barcode used for directing mail. The codes contain a start and stop bit, while the 4 State code (below) does not. While both codes offer the option of a checkdigit, it should be noted that the Royal Mail code must include the checkdigit (which should be calculated automatically).

These codes are based on the UK Post Code system, but may also contain an International Prefix and a Delivery Point Suffix.

Note that in both RM4SCC and 4 State (see below) all characters are converted to upper case prior to encoding and any illegal characters with ASCII codes >32 are converted to X. Illegal caharacters with ASCII codes <= 32 are ignored -- so spaces and carriage returns are ignored.


4 State

4 State is similar to the RM4SCC code and is used in some European countries without the start and stop bits and in some cases without the Checkdigit. This code is referred to as 4 State.


SISAC

(dBarcode SC library only)

Unlike most other barcodes the SISAC barcode symbol does not have a one-to-one correspondence with the SICI code printed underneath it. dBarcode SC generates the SISAC barcode from the SICI code, and it can only do this if the SICI code itself is correct. If the SICI code is not correct then the library will report error number 10.

The SICI code must be entered into the Code edit box or supplied as a database field, and it must contain at least the following items:

The ISSN number complete with a hyphen between digits 4 and 5, e.g. 1234-5678

A date item enclosed in brackets. If no date item is required the () symbols MUST STILL BE PRESENT.

A number item is optional. e.g. 14:1

Index or supplement numbers are optional, e.g. *1

The standard version number which is currently ;1- and all three characters MUST BE PRESENT

A SICI check digit may immediately follow the - of the version number. The check digit may be entered manually or may be calculated by dBarcode by enabling Auto Checksum.

Note: When copying SICI codes from publications it is not always easy to distinguish the : and ; characters. SICI codes ALWAYS end with (semicolon) ;1-n where n is a check digit.

dBarcode SC does not currently support SICI location codes.


Location numbering

With effect from March 1st 1995, EAN International has agreed that all numbering organisations will standardise on the product numbering (ie standard EAN-13) check digit algorithm when calculating check digits for location numbers. The cut-off date for using older check digit algorithms is January 1st 1997.

When producing location numbering barcodes of the EAN-13 pattern users should check whether the newly recommended check digit algorithm (ie that produced by dBarcode) is suitable for their purposes.


Notes on Metafiles

The picture images placed on the clipboard by dLSoft barcode products are ANISOTROPIC metafiles. This means that they can be resized within applications (usually by dragging a corner).

While the barcode bars can be resized over very wide ranges, any text included within the image may not resize as expected. In general changing the height of the image by resizing within another application will change the fontsize used to render the text. Changing the width of the image within another application may cause the position of any text under the barcode to change.

To overcome text size problems caused by resizing metafile images choose an alternative fontsize within the product. The use of TrueType fonts is recommended to prevent unusual effects caused by resizing of text.