Related Information Examples & Tutorials

How To Print Barcodes

Collect! can print reports using seven types of barcodes:

US Postnet - POSTal Numeric Encoding Technique to automate the sorting of mail

3 of 9 - Code 39, USS Code 39, USD-3, Code 3 of 9, Logmars
or HIBC, New York Court Documents

2 of 5 - Industrial uses

128B Alpha Numeric - USS Code 128, UCC-128, ISBT-128, EAN-128,
EAN-14, SSCC-18 and SCC-14 specifications

11 digit Delivery Point PostNet Barcodes used by USPS

128A Digits 0-9, A-Z, ASCII control codes, special characters

128C - Digit pairs 00-99 (double density encoding of numeric only data)

These can be produced for letters printed to the browser, as well as DC printing to a printer. Used with Collect!'s Batch Letter Options, you can switch ON Sort By Postal Code, and produce a sorted mailing in Postal Code order, ready to deliver to the Post Office complete with Postnet Barcodes.

Requirements

- DC Printing
- Familiarity with the Report Writer
- Each type of code has its own specific requirements as listed below

Top of page.

Barcode

SYNTAX: @Barcode(type, {fieldcode}, x, y)

SCALING SYNTAX: @Barcode(4, {fieldcode}, x, y,z) as described below.

Type:

1 - Postnet (normal)
2 - 3 of 9
3 - 2 of 5i
4 - 128B (alphanumeric)
5 - Postnet (11 digit)
6 - 128A (alphanumeric special)
7 - 128C (double density numeric)

Fieldcode:

This is the printable information code for a particular field or it can also be a variable.

X and Y:

These are coordinates in 1/100ths of an inch -- measured from the left (x) and top (y) edges of the printed page.

Example:

@de.na
@de.ad
@de.ci<, @de.st< @de.zi<
@Barcode(1, @de.zi,100,100)

This would print the address and then the Barcode where you placed it with the x,y coordinates. In the example above, x and y are both 100 so this would place the Barcode's starting position 1 inch from the top and 1 inch from the left edge of the printed page.

tip.gif Use the Print Preview "Ruler" feature to map out the exact coordinates to use with this command! Simply press r on your keyboard as soon as the Print Preview displays and then use your mouse to drag the crosshairs. Read the exact coordinates displayed in the Print Preview title bar.


Print Preview Ruler with Coordinates

Z:

This is the scaling factor. The default scaling factor is 96 which is divided into the bitmap width and multiplied by pixels per inch. Only the width of the barcode is scalable, not the height.

tip.gif Barcode scaling is implemented on the Barcode 128 bitmap (i.e. code 4). See examples below.

Top of page.

Postnet Barcode

SYNTAX: @Barcode(1,@de.zi,0,600)

REQUIRES: Properly entered US Zip Codes, either 5 or 9 digit. Does not work with Canadian Postal Codes. Improper data is ignored and barcode is not printed.

USAGE: POSTal Numeric Encoding Technique to automate the sorting of mail

POSTNET (POSTal Numeric Encoding Technique) was developed for use by the United States Postal Service (USPS) to automate the sorting of mail. The code comprises two frame bars at the beginning and end, combinations of five long and short bars for each of the ZIP code digits, and five more long and short bars for the check digit. Each digit from zero to nine is a unique pattern of long and short bars. The eleven-digit bar code is developed from the nine-digit ZIP code and the last two digits of the street address.

Top of page.

3 Of 9 Barcode

SYNTAX: @Barcode(2,@de.zi,0,650)

REQUIRES: Upper case alpha characters, digits 0 - 9, special characters [space, minus (-), plus (+), period (.), dollar sign ($), slash (/), percent (%)] Maximum of 25 characters recommended.

USAGE: Code 39, USS Code 39, USD-3, Code 3 of 9, Logmars or HIBC, New York Court Documents

What is Code 39? (Code 39, USS Code 39, USD-3, Code 3 of 9, Logmars or HIBC)

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 [space, minus (-), plus (+), period (.), dollar sign ($), slash (/), and percent (%)]. Each data character encoded in a Code 39 symbol is made up of 5 bars and 4 spaces for a total of 9 elements. Each bar or space is either "wide" or "narrow" and 3 out of the 9 elements are always wide. That's how the code got its alternate name - Code 3 of 9. The barcode may be of any length, although more than 25 characters is not recommended. Characters are separated by an inter-character gap, which is the same width as a narrow bar.

Code 39 is widely used in many industries and is the standard for many government barcode specifications, including the U.S. Department of Defense, otherwise known as "Logmars" . Code 39 is defined in American National Standards Institute (ANSI) standard MH10.8M-1983, and is also known as USD-3.

Code 39 can be read by just about every scanner on the market. It is widely used for in-house solutions; that is, applications where the barcodes will be used internally. It is also used for transferring data between companies. For example, the Automotive Industry Action Group (AIAG) defines a set of labeling standards for marking inter-company shipments within the industry; these labels use Code 39.

Top of page.

2 Of 5 Barcode

SYNTAX: @Barcode(3,@de.fi,0,700)

REQUIRES: Digits only - numeric character set 0 - 9. Can be as long as needed.

USAGE: Industrial

The 2 of 5 barcode we utilize is the Interleaved type as it is the most common.

The structure of the 2 of 5 barcode family is one of the simplest of the width-modulated industrial bar codes. There are three well known members of this family: the Industrial, Matrix and Interleaved.

These three codes have the following similarities:

Two wide elements per five-element character.
Black bars and white spaces.
Numeric character sets (0-9).
Binary encoding: wide=1; narrow=0. A wide element is typically two to three times wider than a narrow element.
Non-character start/stop, bar/space pattern.
Even-parity character check.
Optional message checksum character.

The Interleaved 2 of 5 barcode has the highest information density of the entire 2 of 5 family. Many inventory and data collections systems currently use both numeric and alphanumeric data to record part numbers and transactions. The 2 of 5 barcode family is capable of encoding numeric data only. Thus, in those instances where alphanumeric data must be encoded, a different code must be selected. Out of the 2 of 5 family Interleaved 2 of 5 is the most common, it is relatively easy to use. The symbol can be as long as necessary to store the encoded data and can hold up to 18 digits per inch when printed using a 7.5 mil X dimension. "Interleaved" comes from the fact that one digit is encoded in the bars of each character and the next digit is encoded in the spaces of that character, thus the digits are "Interleaved" together.

Top of page.

128 Barcodes

Code 128 is a very high-density barcode symbology, used extensively world wide in shipping and packaging industries. GS1-128 (formerly known as UCC/EAN-128) is one of its variants. It is used for alphanumeric or numeric-only barcodes. It can encode all 128 characters of ASCII and is also capable of encoding two numbers into one character width, called double density. This feature is evidence of it being designed to reduce the amount of space the bar code occupies, to address the ever-increasing needs of item catalogs. Each printed character can have one of three different meanings, depending on which of three different character sets are employed. Code 128 is the major component of the labeling standard for GS1-128 (formerly known as UCC/EAN-128), used as product identification for container and pallet levels of retail markets.

Top of page.

128A Alpha Numeric Barcode

SYNTAX: @Barcode(6,@de.ho,0,750,0)

REQUIRES: Can contain digits 0-9, characters A-Z (caps only), ASCII control codes and special characters

Top of page.

128B Alpha Numeric Barcode

SYNTAX: @Barcode(4,@de.ho,0,750,0)

REQUIRES: A minimum of 6 alpha-numeric characters. All 128 ASCII characters. Can be as long as needed. Can contain digits 0-9, characters A-Z and a-z, and special characters

USAGE: USS Code 128, UCC-128, ISBT-128, EAN-128, EAN-14, SSCC-18 and SCC-14 specifications

Top of page.

128C Numeric Barcode

SYNTAX: @Barcode(7,@de.zi,0,750,0)

REQUIRES: Can contain ONLY digits 00-99. Works in pairs. Double density encoding of numeric only data.

tip.gif When a Barcode 128C is about to be output, if the input string is not an EVEN number of digits, the input will be rejected. A REPORT log entry will be written with the offending numeric string.

Top of page.

Barcode Scaling For Code 128

Barcode scaling is now implemented on the Barcode 128 bitmap (i.e. code 4). The default scaling factor is 96 which is divided into the bitmap width and multiplied by pixels per inch. Only the width of the barcode is scalable, not the height.

Examples of use:

@Barcode(4,"string",left,top,scale)
@Barcode(4,@de.ho,100,100,0) - default scaling
@Barcode(4,@de.ho,100,100,96) - same as default scaling
@Barcode(4,@de.ho,100,100) - default scaling


@Barcode(4,@de.ho,100,100,192) - Half as wide


@Barcode(4,@de.ho,100,100,48) - Twice as wide

Top of page.

Delivery Point Postnet 11 Digit Barcode

SYNTAX: @Barcode(5,@de.ad,100,100)

REQUIRES: Entirely numeric string in the debtor's address field.

USAGE: 11 digit Delivery Point PostNet barcoding is used by USPS. In addition to the normal nine digit Zip+4 code, these have an additional two digits representing the Delivery Point code, which is the last two digits of either the street number, highway box, or P.O. box.

Collect! will now attempt to find this code in the debtor address field by pulling the last two characters of the first entirely numeric string found in the field. This should work smoothly assuming that the data is well entered. If there is random junk in there, it will not parse the correct numbers and you will get rejected (or misaddressed) letters.

Top of page.

Barcodes Using Variables

You can use a variable in any of the Barcode commands. You can also use a check digit formatted printable field.

Examples:

Variable without check digit:

@varStr* = @de.zi
@Barcode(5,@varStr,100,100)

Variable with check digit:

@varStr* = @de.zi
@Barcode(5,@varStr,100,100)

Please refer to Help topic, How to Generate a Check Digit for details.

Top of page.

See Also

- Report Sample to view all the sample reports and letters
- Report Topics Index to view a list of all report topics

Top of page.

Was this page helpful? Do you have any comments on this document? Can we make it better? If so how may we improve this page.

Please click this link to send us your comments: helpinfo@collect.org