One-dimensional bar codes

With Forms and Bar Code Card, font selection commands in the incoming PCL  5 emulation data stream are analyzed for typeface characteristic values given in the PCL 5 emulation function parameter list . If the typeface value is one of those given, then special bar code generation firmware processes the font selection command. Otherwise, PCL 5 emulation proceeds as normal.

Defining characteristics

The following commands let you further define characteristics of the bar code:

Command

Characteristic

Esc (s#P

Determines the HRT location printed with the bar code.

Esc (s#H

Selects the HRT font.

Esc (s#V

Selects the bar heights.

Esc (s#B

Selects the bar widths.

Esc (s#S

Selects the space widths.


For more information on bar code characteristic parameters and default values, see PCL 5 emulation function parameter list .

Command structure considerations

These considerations must be followed when implementing bar code applications using Forms and Bar Code Card:

Transparent print data command

Use { Esc &p#X[data] } to print bar codes that contain characters of less than 32 decimal. These characters are considered unprintable.

Sample commands and their characteristics

Command

Characteristic

Esc (s4p2h36v24701T

No data is specified with the bar code selection command.

Esc &p8x20•08•98

The data "20•08•98" (8 bytes) is specified with the transparent print data command immediately following the bar code selection command. The character "•" is associated with decimal code 7 in the PC-8 symbol set.


Returning to normal text printing

Immediately follow the PCL 5 emulation escape sequences that generate bar codes with an escape sequence that specifies a normal text font.

Sample command and its characteristic

Command

Characteristic

Esc (s1p10v0s0b4101T

Returns the text following a bar code to 10-point CG Times with proportional spacing, normal style, and medium stroke weight.


PCL 5 emulation escape sequences

Command

Function parameters

Esc (s#P or AEC )s#P

Determines the HRT location printed with the bar code.

0 —Use the default value.

1 —Do not print the text.

2 —Print the text embedded.

3 —Print the text half embedded.

4 —Print the text below bar code.

5 —Print the text above bar code.

Add the preceding values to the following numbers to produce the intended effect:

10 —Prints UPC-A checksum on the middle left of the bar code instead of the lower left.

10 —Prints start and stop " * " characters with Code 3 of 9 text.

20 —Formats German Postal bar codes.

100 —Prints the checksum character with text.

Note:  For UPC-E symbologies, checksum characters are printed if HRT is specified. The checksum characters are printed half-height when 100 is added to the p parameter.

For example:

Esc (s13p24670T

Selects Code 3 of 9 with HRT half embedded and start/stop " * " characters. Because parameters v , b , s , and h are not specified, their values default to:

  • v —0.04 in.

  • b1 , s1 —0.01 in.

  • b2 , s2 —0.03 in.

  • h —Automatically sized Courier Bold.

Esc (s#H or AEC )s#H

Selects the HRT font. The numeric value of # is of the form ABC, where:

  • A is the font style.

    0 —Use the default value (bold).

    1 —Regular.

    2 —Italic.

    3 —Bold.

    4 —Bold Italic.

  • B is the font size.

    0 —Automatic font size (default).

  • C is the font typeface.

    0 —Courier (default).

    1 —Letter Gothic.

    2 —Univers.

    3 —Univers Condensed.

    4 —CG Times.

    5 —OCR-B.

For example:

Esc (s304h24620T

Selects EAN/JAN-8 with automatically sized CG Times Bold text. Because parameters v , p , b , and s are not specified, their values default to:

  • v —0.7 in.

  • p —Print the text half embedded.

  • b1 , s1 —0.013 in.

  • b2 , s2 —0.027 in.

  • b3 , s3 —0.04 in.

  • b4 , s4 —0.053 in.

Esc (s#V or AEC )s#V

Selects the bar height in points (1/72 in.).

The bar height can vary from a minimum of 3 points (0.04 in. or 1 mm) to a maximum of 960 points (13.33 in. or 33 cm). Symbologies where #v is a fixed value are excluded.

For example:

Esc (s36v24750T

Selects the Codabar symbology with a bar height of 0.5 in. Because parameters p , b , s , and h are not specified, their values default to:

  • p —Do not print the text.

  • b1 , s1 —0.01 in.

  • b2 , s2 —0.03 in.

  • h —Not applicable because of #p parameter value.

Esc (s#1,#2,#3,#4B or AEC )s#1,#2,#3,#4B

Selects bar widths in dots (1/600 in.).

Some bar codes require only two values for this command. Others require all four values.

1 —First width (narrowest).

2 —Second width.

3 —Third width.

4 —Fourth width.

For example:

Esc (s3,9b24640T

Selects the Interleaved 2 of 5 symbology with narrow bars 3 dots wide, and wide bars 9 dots wide. Because parameters v , p , s , and h are not specified, their values default to:

  • v —0.40 in.

  • p —Do not print text.

  • s1 —0.01 in.

  • s2 —0.03 in.

  • h —Not applicable because of #p parameter value.

Esc (s#1,#2,#3,#4S or AEC )s#1,#2,#3,#4S

Selects space widths in dots (1/600 in.).

Some bar codes require only two values for this command. Others require all four values.

1 —First width (narrowest).

2 —Second width.

3 —Third width.

4 —Fourth width.

For example:

Esc (s4p8,16,24,32s8,16,24,32b24700T

Selects Code 128 autoswitch with text printed below the bar code. The bar and space widths are set to 8, 16, 24, and 32 dots. Because parameters v and h are not specified, their values default to:

  • v —0.40 in.

  • h —Automatically sized Courier Bold.


PCL 5 emulation function parameter list

Command

Function parameters "(#v" units are in 1/72 in. "#b, s" units are in 1/600 in,

Esc (s#T or AEC )s#T

Selects the bar code symbology

Default parameters 1

Characters encoded

Symbol 2 length

Checksum character

Typeface #

Bar code symbology

#v

#p

#b1, s1

#b2, s2

#b3, s3

#b4, s4

23591

USPS Zebra code

22.5†

1

112†

N/A

N/A

N/A

Numeric

N/A

No

24600

UPC-A

74.4

3

8

16

24

32

Numeric

11

Yes 3

24601

UPC-A with 2-digit supplemental

74.4

3

8

16

24

32

Numeric

13

Yes 3

24602

UPC-A with 5-digit supplemental

74.4

3

8

16

24

32

Numeric

16

Yes 3

24610

UPC-E

28.8

3

8

16

24

32

Numeric

6

Yes 3

24611

UPC-E with 2-digit supplemental

28.8

3

8

16

24

32

Numeric

8

Yes 3

24612

UPC-E with 5-digit supplemental

28.8

3

8

16

24

32

Numeric

11

Yes 3

24620

EAN/JAN-8

50.4

3

8

16

24

32

Numeric

7

Yes 3

24621

EAN/JAN-8 with 2-digit supplemental

50.4

3

8

16

24

32

Numeric

9

Yes 3

24622

EAN/JAN-8 with 5-digit supplemental

50.4

3

8

16

24

32

Numeric

12

Yes 3

24630

EAN/JAN-13

74.4

3

8

16

24

32

Numeric

12

Yes 3

24631

EAN/JAN-13 with 2-digit supplemental

74.4

3

8

16

24

32

Numeric

14

Yes 3

24632

EAN/JAN-8 with 5-digit supplemental

74.4

3

8

16

24

32

Numeric

17

Yes 3

24640

Interleaved 2 of 5

28.8

1

6

18

N/A

N/A

Numeric

Even

No

24641

Interleaved 2 of 5 with check digit

28.8

1

6

18

N/A

N/A

Numeric

Odd

Yes

24642

German Postal 2 of 5 Leitcode

72.0

124

10

30

N/A

N/A

Numeric

13

Yes

24643

German Postal 2 of 5 Identcode

72.0

124

10

30

N/A

N/A

Numeric

11

Yes

24644

USPS tray label, 10-digit 2 of 5

50.4†

4

9

27

N/A

N/A

Numeric

10

No

24645

USPS sack label, 8-digit 2 of 5

50.4†

1

9

27

N/A

N/A

Numeric

8

No

24650

Industrial 2 of 5

28.8

1

6

18

N/A

N/A

Numeric

N/A

No

24651

Industrial 2 of 5 with check digit

28.8

1

6

18

N/A

N/A

Numeric

N/A

Yes

24660

Matrix 2 of 5

28.8

1

6

18

N/A

N/A

Numeric

N/A

No

24661

Matrix 2 of 5 with check digit

28.8

1

6

18

N/A

N/A

Numeric

N/A

Yes

24670

Code 3 of 9

28.8

1

6

18

N/A

N/A

Mixed

N/A

No

24671

Code 3 of 9 with check digit

28.8

1

6

18

N/A

N/A

Mixed

N/A

Yes

24672

Code 3 of 9 space encoding

28.8

1

6

18

N/A

N/A

Mixed

N/A

No

24673

Code 3 of 9 space encoding with check digit

28.8

1

6

18

N/A

N/A

Mixed

N/A

Yes

24675

Danish PTT 3 of 9

28.8

1

6

18

N/A

N/A

Mixed

10

Yes 3

24676

French Postal 3 of 9 A/R

36.0†

124†

7†

21†

N/A

N/A

Mixed

10

Yes 3

24680

Code 3 of 9 extended

28.8

1

6

18

N/A

N/A

Mixed

N/A

No

24681

Code 3 of 9 extended with check digit

28.8

1

6

18

N/A

N/A

Mixed

N/A

Yes

24690

Code 93

28.8

1

6

12

18

24

Mixed

N/A

Yes

24691

Code 93 extended

28.8

1

6

12

18

24

Mixed

N/A

Yes

24700

Code 128 autoswitch

28.8

1

6

12

18

24

Mixed

N/A

Yes

24701

Code 128 A

28.8

1

6

12

18

24

Mixed

N/A

Yes

24702

Code 128 B

28.8

1

6

12

18

24

Mixed

N/A

Yes

24704

Code 128 C

28.8

1

6

12

18

24

Mixed

N/A

Yes

24710

UCC-128

28.8

5

6

12

18

24

Mixed

N/A

Yes 3

24720

EAN-128

28.8

1

6

12

18

24

Mixed

N/A

Yes

24750

Codabar

28.8

1

6

18

N/A

N/A

Mixed

N/A

No

24751

Codabar with mod16 check digit

28.8

1

6

18

N/A

N/A

Mixed

N/A

Yes

24760

MSI

28.8

1

6

12

18

24

Numeric

N/A

No

24761

MSI with mod10 check digit

28.8

1

6

12

18

24

Numeric

N/A

Yes

24762

MSI with mod10 and mod10 check digits

28.8

1

6

12

18

24

Numeric

N/A

Yes

24763

MSI with mod11 and mod10 check digits

28.8

1

6

12

18

24

Numeric

N/A

Yes

24770

USPS POSTNET 5-digit ZIP code

9†

1†

12†, 22

N/A

N/A

N/A

Numeric

5

Yes

24771

USPS POSTNET 9-digit ZIP with 4 code

9†

1†

12†, 22

N/A

N/A

N/A

Numeric

9

Yes

24772

USPS POSTNET 11-digit delivery point code

9†

1†

12†, 22

N/A

N/A

N/A

Numeric

11

Yes

24780

Singapore Post 4-State bar code

14.5†

1

11†, 16

N/A

N/A

N/A

Y

6

Yes

24785

Australia Post 4-State bar code 37-CUST

14.5†

1

11†, 16

N/A

N/A

N/A

Y

37

Yes

24786

Australia Post 4-State bar code 52-FF-MET

14.5†

1

11†, 16

N/A

N/A

N/A

Y

52

Yes

24787

Australia Post 4-State bar code 67-FF-MET

14.5†

1

11†, 16

N/A

N/A

N/A

Y

67

Yes

24810

RSS-14 standard

33

1

8

16

24

32

Numeric

13

Yes

24811

RSS-14 Truncated

13

1

8

16

24

32

Numeric

13

Yes

24812

RSS-14 Stacked

13

1

8

16

24

32

Numeric

13

Yes

24814

RSS-14 Limited

10

1

8

16

24

32

Numeric

13

Yes

24815

RSS-14 Expanded

34

1

8

16

24

32

Mixed

N/A

Yes


Post 4-State bar code descriptors

Function parameters for Australia Post 4-State bar code

HP compatibility mode using typeface 24785, 24786, and 24787.

The #p parameter specifies the encoding table to use for customer information:

0

N table

1

C table

The default value if #p parameter is not specified in the PCL 5 emulation calling sequence.


Note:  The encoding table values are the opposite of the encoding table field byte 7 of the Lexmark bar code descriptor for Australia Post 4-State bar codes. HRT is not printed with these bar codes. For more information, see PCL 5 emulation escape sequences .

In relation to the fields of the Lexmark bar code descriptor for Australia Post 4-State bar codes, the following correspondences exist when using this technique:

Technique correspondences

Bar width (in 1/100 mm units)

Fixed at 47

Bar pitch (in bars per in.)

Fixed at 22

Tracker height (in 1/100 mm units)

Fixed at 123

Ascender or descender offset (in 1/100 mm units)

Fixed at 195

FCC

Specified by typeface number.

Note:  FCC 45 is not available.

Encoding table

Specified by #p parameter where the default is 1 (C table)


Function parameters for Singapore Post 4-State bar code

HP compatibility mode using typeface 24780.

In relation to the fields of the Lexmark bar code descriptor for Singapore Post 4-State bar codes, the following correspondences exist when using this technique:

Technique correspondences

Bar width (in 1/100 mm units)

Fixed at 47

Bar pitch (in bars per in.)

Fixed at 22

Tracker height (in 1/100 mm units)

Fixed at 123

Ascender or descender offset (in 1/100 mm units)

Fixed at 195


Specifying bar pitch for USPS POSTNET

For typefaces 24770, 24771, and 24771, the s1 parameter specifies the bar pitch in bars per inch. For example, a bar pitch value of 20 is used for any bar pitch that is less than 20. A bar pitch value of 24 is used for any bar pitch that is greater than 24.

The default value is 22.

USPS Zebra code

The USPS Zebra code is a series of diagonal or vertical bars placed to the right of a USPS tray label bar code to identify trays containing bar-coded mail. Each line must be 0.250 inch to 0.375 inch (6.35 mm to 9.52 mm) high, 0.125 inch to 0.250 inch (3.18 mm to 6.35 mm) wide. Separate these lines with blank spaces equal in size to the line widths.

The only valid characters in this symbology are " / " (ASCII 47) and " | " (ASCII 124). Spaces between bars are automatically inserted. The base of each successive bar is printed beginning 1 space width from the right end of the base of the previous bar. The widths of the bars and spaces for this symbology are fixed. As for a diagonal bar, the width of the bar refers to the width of its base.

An invalid character in the data produces a blank space in the symbol equal to 2 space widths, and does not produce an error message. An invalid character can follow a valid character. The blank space begins 1 space width from the right end of the base of the bar produced by the valid character.

After printing, the position of the cursor varies, depending on the last character printed:

To generate a Zebra code, send consecutive " / " or " | ", similar to the following PCL 5 emulation commands:

Note:  The third command in the sequence depends on whether you want to print diagonal or vertical bars.

Command

Characteristic

Esc (10U

Selects PC-8 symbol set.

Esc (s0p4.5h0s0b4099T

Selects 4.5 cpi fixed space Courier font.

Esc &k2H/////////         /////////         /////////         /////////

Prints diagonal bars.

This command contains 4 groups of 9 diagonal bars, where each group is separated by 9 spaces.

Esc (s#B|||||||||         |||||||||         |||||||||         |||||||||

Prints vertical bars.

This command contains 4 groups of 9 vertical bars, where each group is separated by 9 spaces.


RSS-14 bar code descriptors

RSS-14 is a linear symbology that encodes the full 12-digit EAN/UCC item identification in a linear symbol. Suitably programmed point-of-sale scanners can scan this bar code omnidirectionally.

The RSS family contains three linear symbologies:

Intelligent Mail bar code

Intelligent Mail bar code, also known as OneCode, IMB, or 4-State bar code, is used by the United States Postal Service (USPS) to sort and track letters and flats. It combines data from the POSTNET and the PLANET bar codes.

The HP BarDIMM version 5.0 supports Intelligent Mail bar code. The command from this version has no PCL emulation parameters. It is printed on one size.

Field name

Type

Range

Default value

Description

Esc (s#T

name

NA

NA

Required.

24775T.

Esc (s#p

HRT location

0 —Use the default value.

1 —No HRT.

2 —Print the text embedded.

3 —Print the text half embedded.

4 —Print the text below bar code.

5 —Print the text above bar code.

1

Optional.

Note:  Intelligent Mail bar code uses only the values 1, 4, and 5. Other values not specified are replaced with 1.