Chapter 2 Configuring the PCL-II Emulation with Control Codes

Printing Multiple Labels On The Same Line

Printing more than one label on the same line involves no more than positioning the cursor and sending the data for each label to be printed. Since the termination of the bar code data sequence (signalled by an upper-case Z) causes the bar code to be printed and a carriage return to be executed, all of the label information must be sent in the same escape sequence. The following example shows an escape sequence used to print three labels on a single line:

ESC*z5c<label1>z20c<label2>z35c<label3>Z

ESC*z5c

Moves cursor to column 5

<label1>

Bar code data

z20c

Moves cursor to column 20

<label2>

Bar code data

z35c

Moves cursor to column 35

<label3>

Bar code data

Z

Initiates printing

Printing Bar Codes With Text

When printing bar codes with text, since the printer automatically generates a carriage return and line feed at the end of the terminating character (upper case Z), potential problems exist. As a general rule, for each line of bar code mixed with text, send the text information first, followed by a carriage return without a line feed (ASCII 13), and then overlay the bar code. (The carriage return is required so that the bar code cursor position will be correct.) The following example illustrates how to print text and bar codes on the same line.

This example involves a three-line bar code (and three escape sequences) as shown below:

ESC*z0v25c1q<12345>Z

ESC*z0v

Selects Code 3 of 9

25c

Moves cursor to column 25

1q

Specifies header placement above label

<12345>

Bar code data

ZEnables printing this portion of the bar code

ESC*z75CThis is textCRESC*z0q25c<12345>Z

ESC*z75C

Moves cursor to column 75

This is text

Text for right of bar code

CR

Carriage return without a line feed

ESC*z0q

Disables header for this portion

25c

Moves cursor to column 25

<12345>

Bar code data

ZInitiates printing this portion

ESC*z25c0q<12345>Z

ESC*z25c

Moves cursor to column 25

0q

Disables header for lower portion

<12345>

Bar code data

Z

Initiates printing for lower portion of label

46

Page 46
Image 46
Compaq 5525B/31/32 manual Printing Multiple Labels On The Same Line, Printing Bar Codes With Text