-----=====Canon Printing System Language (CaPSL)=====-----
=====Introduction=====
Canon's CaPSL was first created when Canon created it's first laser
printers. It was a fairly complicated language that supports many
capabilities. It can also enter Diablo emulation mode in which Diablo
commands are used. Diablo was an old daisywheel printer series,
so the language is now obsolete anyways.
CaPSL itself became obsolete since hp's Printer Control Language (PCL)
had become an industry standard. Most Canon printers today use PCL
instead of CaPSL.
=====Notes=====
(now mostly obsolete in favor of the hp PCL language)
(supports most ANSI/ISO control characters, including 8-bit ones)
(supports Diablo daisywheel-printer emulation)
(spaces in escape sequences are literal except for those seperating the
 escape sequence from the "-" character which indicates the end of the
 escape sequence)
 (Note that ` is always 27h)

=====Initialization and General Operation=====
ESC; - Initialize
ESC: - Enter Diablo emulation mode
ESCc - Hard Reset
ESC< - Soft Reset

=====Font Options=====
ESC[4m - Underscore on
ESC[21m - Double underline on
ESC[1m - Bold on
ESC[3m - Italic on
ESC[7m - Inverse
ESC[5m - Shaded
ESC[0m - Turn off underline/bold/italic/shaded/inverse modes
ESC[?7m - Outline on
ESC[?27m - Outline off
ESC[?6m - Shadow on
ESC[?26m - Shadow off

(Note: the following four escape sequences are distinguished by an
 invisible character, either 140 or 139 decimal, or 8B or 8C hex)
ESC[2 K - Subscript on (ends with 8Bh)
ESC[0 K - Subscript on (ends with 8Ch)
ESC[2 K - Superscript on (ends with 8Ch)
ESC[0 K - Superscript off (ends with 8Bh)

=====Character Size=====
ESC[100;200 B - Wide characters on
ESC[200;100 B - Tall characters on
ESC[200;200 B - Large characters on
ESC[100;100 B - Normal-sized characters
ESC[22m - Upright character
ESC[23m - Medium character

=====Set Horizontal and Vertical Resolution=====
(The following 3 escape sequences are one command, also represented
in hexadecimal)
    ESC(%$2
    ESC[0 K
    ESC[3y
or
    1B 28 25 24 32 1B 5B 30 20 4B
-Set resolution to 10 CPI (Characters Per Inch)

(The following 2 escape sequences are one command, also represented
in hexadecimal)
    ESC[1 K
    ESC[2y
or
    1B 5B 31 20 4B 1B 5B 32 4B
-Set resolution to 12 CPI (Characters Per Inch) (requires BM3 card)

(The following 3 escape sequences are one command, also represented
in hexadecimal)
    ESC(%$2
    ESC[2 K
    ESC[3y
or
    1B 28 25 24 32 1B 5B 32 4B
-Set resolution to 15 CPI (Characters Per Inch)

(The following 3 escape sequences are one command, also represented
in hexadecimal)
    ESC(%$2
    ESC[1666 K
or
    1B 28 27 24 32 1B 5B 3F 31 36 36 36 20 4B
-Set resolution to 17 CPI (Characters Per Inch)

(The below commands are all single commands; spaces are literal as always,
so "ESC[3 L" for example is [1B/5B/33/20/4C] hexadecimal. Note that spaces
between the command, "-" hyphen, and description are not literal.)
ESC[0 L - Set vertical resolution to 6 LPI (Lines Per Inch)
ESC[1 L - Set vertical resolution to 4 LPI (Lines Per Inch)
ESC[2 L - Set vertical resolution to 3 LPI (Lines Per Inch)
ESC[3 L - Set vertical resolution to 12 LPI (Lines Per Inch)
ESC[4 L - Set vertical resolution to 8 LPI (Lines Per Inch)
ESC[;60 G - Set resolution to 10 CPI "HMI"
ESC[;72 G - Set resolution to 12 CPI "HMI"

=====Miscellaneous=====
FF (0C hexadecimal) - Form Feed: ejects current page and moves to next one.

(The following two lines are a single command in which New Lines are
not literal and spaces are. The hexadecimal for this is
[1B/28/27/24/32/1B/29/27/20/32])
ESC(`$2
ESC)` 2
-Change to line-drawing font.

=====Page Options=====
ESC[0%r - Portrait mode
ESC[1%r - Landscape mode
ESC[0#x - Duplex (both sides) Printing
ESC[1#x - Simplex (single-sided side) Printing
ESC[32p - Legal-size paper
ESC[30p - Letter-size paper

=====Optional commands for model-specific features=====

(The following command has non-literal New Lines but all spaces are literal.
The hexadecimal code for this is
[1B/5B/37/20/49/1B/5B/38/31/3B/31/32/30/30/3B/70/"Line 11 Pos 31"])
ESC[81;2400;
1200;p "Line 11 Pos 31"
-Envelope Tray

ESC[0q - Cassette (LBP-4 optional cassette) on
ESC[1q - Manual Feed (on LBP-4 multipurpose tray)
ESC[2q - Bottom Bin (LBP 8III T/R)
ESC[3q - Top Bin (LBP 8III T/R)
ESC[4q - Optional Feeder (LBP 8III T/R)