Printing bar codes using Printer Controls

To print bar codes, you should use SAP (i.e. ABAP, SAPscript, ...) to embed special Printer Controls in the data sent to SAPLPD.

When SAPLPD receives a printer control, like the one below, the BARCODE.DLL prints an appropriate bar code at the current position.

A Printer Control is a set of named values, like;

<ESC>bC=<Type>,P=<Check>,D=<Data><ESC>

<ESC> is the ASCII character ESC, 27, hex 1B

Example: This example will print an Interleaved 2-of-5 bar code with check characters for number 0123456789.

<ESC>bC=25L,P=1,D=0123456789<ESC>

The BARCODE.DLL can print bar codes using two methods; graphics or fonts.

The Printer Control values below are used by both methods.

C=<Type>

This value selects the type of bar code (symbology).

Type

Barcode

Note

C=39

Code 39

Code 39 Extended is used automatically.

C=25I

Industrial 2-of-5

Available on request.

C=25L

Interleaved 2-of-5

 

C=25M

Matrix 2-of-5

Available on request.

C=39E

Code 39 Extended

 

C=CODA

Codabar

 

C=93

Code 93

Code 93 Extended is used automatically.

C=93E

Code 93 Extended

 

C=128B

Code 128 (Subset B)

Subset A, B and C are used automatically.

C=E13

EAN 13

 

C=E13+2

EAN 13 + 2 Digit

 

C=E13+5

EAN 13 + 5 Digit

 

C=E8

EAN 8

 

C=E8+2

EAN 8 + 2 Digit

 

C=E8+5

EAN 8 + 5 Digit

 

C=UA

UPC A

 

C=UA+2

UPC A + 2 Digit

 

C=UA+5

UPC A + 5 Digit

 

C=UCE

UPC E

 

C=UCE+2

UPC E + 2 Digit

 

C=UCE+5

UPC E + 5 Digit

 

P=<Check>

Most bar code types have optional check character or mandatory check characters which must be calculated.

Use P=1 for automatic bar code check character. Use P=0 for no checksum.

If P=0 is used and check character is mandatory (e.g. Code 128) then P=1 is assumed.

D=<Data>

This defines the data to be printed as a bar code. This must the last parameter.

A=<Human Readable>

If A=1 human readable text of the bar code is printed below the bar code. If A=0 then no human readable text of the bar code is printed below the bar code. Default is A=1.

R=<Angle>

If R=90 the bar code is rotated 90 degrees. Other useful values are 180 or 270 degress. Default is R=0.

 

 

 


Copyright 2000 CIA (BAR CODES) UK. All rights reserved. Reproduction prohibited.