Combining escape sequences

You can combine PCL emulation commands by linking them if the first 3 bytes of the commands are identical. The combined short form sends the first 3 bytes only once in the string. To combine commands, do these tasks:

  • Use the first 3 bytes (characters) of the command only once at the start of the command string.

  • Make the last letter of each command in the string lowercase.

  • Capitalize the last letter of the string.

    With some PCL printers, you can combine multiple commands with the encoding setting. The following command is a concatenation of two other commands:

    <ESC/>(s<var name = "fontPitch"/>H4099T

    It is 3 bytes shorter than the long form:

    <ESC/>(s<var name = "fontPitch"/>H<ESC/>(s4099T

Combined sequence that specifies the Courier font

The following sequence specifies the Courier printer-resident font on a Lexmark 644 PCL printer:

<ESC/>&amp;t0P<ESC/>(19U<ESC/>(s0p<var name="fontPitch"/>h0s0b4099T

The following table describes the meaning of each sequence expression in the above example.

Sequence expression

Meaning

(<ESC/>&amp;t0P) 

Character codes are interpreted as 1-byte characters (text-parsing method).

(<ESC/>(19U) 

Windows 3.0 character encoding.

(<ESC/>(s0p<var name= 
"fontPitch"/>h0s0b4099T)

A combined escape sequence that comprises the following parts (shown in their non-combined form):

  • <ESC/>(s0P specifies constant primary spacing (monospace).

  • <ESC/>(s<var name="fontPitch"/>H specifies the number of characters per inch. (See Use of variables in sequences.)

  • <ESC/>(s0S specifies the font style as upright (default).

  • <ESC/>(s0B specifies a medium stroke weight (default).

  • <ESC/>(s4099T specifies the Courier font.

Combined sequence that specifies the Coronet font

The following sequence specifies the Coronet printer-resident font on a Lexmark 644 PCL printer:

<ESC/>&amp;t0P<ESC/>(19U<ESC/>(s1p<var name="fontSize" />v1s0b4116T

The following table describes the meaning of each sequence expression in the above example.

Sequence

Meaning

(<ESC/>&amp;t0P) 

Character codes are interpreted as 1-byte characters (text-parsing method).

(<ESC/>(19U) 

Windows 3.0 character encoding.

<ESC/>(s1p<var name="fontSize" />v1s0b4116T

A combined escape sequence that comprises the following parts (shown in their non-combined form):

  • <ESC/>(s1P specifies proportional primary spacing.

  • <ESC/>(s<var name="fontSize"/>V specifies font height in points. (See Use of variables in sequences.) The variable value is supplied by the Output server.

  • <ESC/>(s1S specifies font style as italic.

  • <ESC/>(s0B specifies medium (default) stroke weight.

  • <ESC/>(s4116T specifies Coronet font.

// Ethnio survey code removed