Just to make things a bit clearer, and assuming that
^[ is the method used by the source application/operating regime to represent/generate the (non-graphic) control-code Escape character (the character with decimal code 27, or hexadecimal 1B, or octal 033):
Original sequences:
Code:
<Esc>&l5E Top Margin (5 lines)
<Esc>&a1L Left Margin (column 1)
<Esc>&a1M Right Margin (column 1)
<Esc>&l9D Line Spacing (9 lines per inch)
<Esc>&l1O Orientation: Landscape
<Esc>&k2S Pitch Mode: Compressed (16.6 cpi)
Jim's sequences:
Code:
<Esc>&l2a Page Size: Letter
1o Orientation: Landscape
9d Line Spacing (9 lines per inch)
5e Top Margin (5 lines)
63F Text Length (63 lines)
Potential problems with the original sequences:
- The right margin and left margin are both set to column 1.
... and the width of these 'columns' is defined by the current HMI (Horizontal Motion Index) which is set in various ways, including (I think) the 'Pitch Mode' sequence (which is considered to be obsolete on modern PCL5 printers).
- The 'Set Top Margin' sequence sets a margin in terms of lines spaced at the
current line spacing; as this sequence is the first, it will probably use the 'power-on default line spacing.
- The 'Set Orientation' escape sequence resets (amongst other things) the top, left and right margins to their 'user-default' (power-on) values, thus effectively ignoring the values just set.