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

Page 46

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

Image 46
Contents 5525B/31/32 Line Matrix Printer Page PCL-II Programmer’s Reference Manual Page Trademark Acknowledgements Page Table of Contents Standard Ascii Character Set Introduction Related Product InformationSoftware Features HP PCL-II HP PCL-II Emulation Default Settings Switching Between the EmulationsConfiguring the PCL-II Emulation with Control Codes Printer Feature Set CompatibilityProgrammatic Printer Control General InformationLogical and Physical Pages Escape Sequences Combining Escape SequencesPCL Level Escape Sequences Line Printer Escape Sequences Explanation Programmable Reset Character Font Selection Symbol Set Selection OCR-A Print Pitch Selection Printing in the Hex 80 through Hex FF RegionCharacter Style Selection Character Density Selection PCL LevelHS DP NLQ Switching Character Fonts Print Mode Selection Display Functions ModeSelf-test Vertical Forms Control VFC Line SpacingStandard Computed VFC Page Programmable VFC Special VFC ConsiderationsProgrammable VFC Using PCL Example FormChannel Line Configuring the PCL-II Emulation with Control Codes Programmable VFC Ascii CTL MSB/LSB Example VFC Data Entry Methods \CHANGEQ 7 to 00 \CHANGEQ 8 to Logical Page Length Selection Logical Page Length SelectionPerforation Skip Mode Text Length Vertical Margin SelectionHorizontal Margin Selection Transparent Print DataCursor Control Raster Graphics ESC*b# of raster lines YUnderlining Bar Codes Character OverstrikeESC*z#V Bar Code Selection ESC*z#Q Bar Code Header Control ESC*z#C Bar Code Label PlacementESC*z#H Bar Code Height ESC*zBar Code DataZ Bar Code Label DataPrinting Bar Codes Printing Multiple Labels On The Same Line Printing Bar Codes With TextBar Code Width Information Bar Code Number of Characters SentCode 3 EAN8 Royal MailAdditional Product ID Assigned By Manufacturer N3+an..30 Width, Diameter, or 2nd Dimension, Inches, Logistics N4+n6 US Postnet Barcodes Data Value Representation256X US Postnet BAR Code CPI 22.5 Bars per inch US Postnet BAR Code2 3 4 5 6 7 8 9 CPI 20 Bars per inch US Postnet Bar Code CPI 20 Bars per inch US Postnet Bar Code MethodConfiguring the PCL-II Emulation with Control Codes Standard Ascii Character Set Appendix a Index Bar Code Underlining PCL-II Upca Page Page 5525B/31/32 Line Matrix Printer