Compaq 5525B/31/32 manual Combining Escape Sequences

Page 15

Escape Sequences

Escape Sequences

An escape sequence consists of the ESC control code followed by one or more characters in succession. Both two-character and structured escape sequences control the printer. Two-character escape sequences take the form ESCX, where X is a character from the ASCII table (0 through ~).

Structured escape sequences take the following form:

ESCXy[parameter]Z

This sequence is explained below:

ESCXy Prefix. This part of the escape sequence indicates that the escape sequence is structured and also specifies which type of control is being performed. “X” is referred to as the structured character; “y” is referred to as the group character.

Parameter This string of ASCII characters specifies a value (either numeric or alphanumeric).

ZTerminator. This ASCII character indicates the function to which the previous parameter value applies. If this character is lower case (a,b,c, etc.), it indicates a combined escape sequence, meaning that more structured information will follow. If the character is upper case (A,B,C, etc.), it terminates the escape sequence string.

NOTE: Brackets [ ] are shown in many of the escape sequences for clarification purposes, but are not actually part of the escape sequence. For example, the brackets in the escape sequence for selecting page length (ESC&l[1-128]P) specify a range of values (1 through 128) for page length. To specify a page length of 35 lines, the escape sequence ESC&l35P would be sent to the printer.

Combining Escape Sequences

Structured escape sequences can be combined to save keystrokes. Combining sequences involves adding the parameter value and terminator of one or more sequences to another escape sequence. Structured sequences can be combined only if their prefixes are identical. When a parameter/ terminator of one sequence is added to another sequence, all of the terminators except the last should be lower case. For example, to set the left and right margins using two separate escape sequences, the following two sequences would be sent:

Set left margin at position 10

ESC&a10L

Set right margin at position 99

ESC&a99M

Using one combined escape sequence, the following would be sent to the printer:

ESC&a10l99M

15

Image 15
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 Related Product Information IntroductionSoftware Features HP PCL-II Switching Between the Emulations HP PCL-II Emulation Default SettingsPrinter Feature Set Compatibility Configuring the PCL-II Emulation with Control CodesGeneral Information Programmatic Printer ControlLogical and Physical Pages Combining Escape Sequences Escape SequencesPCL Level Escape Sequences Line Printer Escape Sequences Explanation Programmable Reset Character Font Selection Symbol Set Selection OCR-A Printing in the Hex 80 through Hex FF Region Print Pitch SelectionCharacter Style Selection PCL Level Character Density SelectionHS DP NLQ Switching Character Fonts Display Functions Mode Print Mode SelectionSelf-test Line Spacing Vertical Forms Control VFCStandard Computed VFC Page Special VFC Considerations Programmable VFCExample Form Programmable VFC Using PCLChannel 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 SelectionText Length Vertical Margin Selection Perforation Skip ModeTransparent Print Data Horizontal Margin SelectionCursor Control ESC*b# of raster lines Y Raster GraphicsUnderlining Character Overstrike Bar CodesESC*z#V Bar Code Selection ESC*zBar Code DataZ Bar Code Label Data ESC*z#C Bar Code Label PlacementESC*z#H Bar Code Height ESC*z#Q Bar Code Header ControlPrinting Bar Codes Printing Bar Codes With Text Printing Multiple Labels On The Same LineBar Code Number of Characters Sent Bar Code Width InformationCode 3 Royal Mail EAN8Additional Product ID Assigned By Manufacturer N3+an..30 Width, Diameter, or 2nd Dimension, Inches, Logistics N4+n6 Data Value Representation US Postnet BarcodesCPI 22.5 Bars per inch US Postnet BAR Code 256X US Postnet BAR Code2 3 4 5 6 7 8 9 CPI 20 Bars per inch US Postnet Bar Code Method CPI 20 Bars per inch US Postnet Bar CodeConfiguring 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