LaserSmith

Click here to return to the LaserSmith home page!

Printer Codes

The following lists the commands available in the Esc/P2 language, arranged by function.

PAGE FORMATTING COMMANDS:

Set page length
    In reference units: Esc ( C
    In inches: Esc C nul
    In lines: Esc C

Margins
    Set bottom: Esc N
    Cancel bottom: Esc O
    Set left: Esc l
    Set right: Esc Q
    Set top and bottom: Esc ( c

Changing print position, horizontal
    Set horizontal position, absolute: Esc $
    Set horizontal position, relative: Esc \
    Backspace: BS
    Carriage return: CR
    Horizontal tab: HT
    Set horizontal tab: Esc D

Change print position, vertical
    Set vertical position, absolute: Esc ( V
    Set vertical position, relative: Esc ( v
    Advance vertical position: Esc J
    Line feed: LF
    Form feed: FF
    Reverse paper feed: Esc j
    Vertical tab: VT
    Set vertical tab: Esc B

Horizontal/vertical skip: Esc f  

TEXT FORMATTING CODES:

Change line spacing
    Set 1/8 inch line spacing: Esc 0
    Set 1/6 inch line spacing: Esc 2
    Set m/180 inch line spacing: Esc 3
    Set n/216 inch line spacing: Esc 3
    Set n/360 inch line spacing: Esc +
    Set n/60 inch line spacing: Esc A
    Set n/72 inch line spacing: Esc A
    Set 7/72 inch line spacing: Esc 1
   
Change character pitch and spacing

    Set 10 pitch: Esc P
    Set 12 pitch: Esc M
    Set 15 pitch: Esc p
    Select font pitch and point: Esc X
    Set horizontal motion index: Esc c
    Set inter-character spacing: Esc SP

Select/deselect proportional spacing: Esc p

Change character attributes
    Select bold printing: Esc E
    Cancel bold printing: Esc F
    Select condensed printing (recommended): SI
    Select condensed printing (obsolete): Esc SI
    Cancel condensed printing: DC2
    Turn double-height printing on and off: Esc w
    Select double-strike printing: Esc G
    Cancel double-strike printing: Esc H
    Select one line double-width printing (recommended): SO

    Select one line double-width printing (obsolete): Esc SO
    Turn double-width printing on and off: Esc W
    Cancel double-width printing: DC4
    Select italic printing: Esc 4
    Cancel italic printing: Esc 5
    Select superscript/subscript printing: Esc S
    Cancel superscript/subscript printing: Esc T
    Switch underlining on and off: Esc -
    Select line/score: Esc ( -
    Choose character style: Esc q

    Choose LQ or draft: Esc x
    Choose typeface: Esc k

Graphics and character printing:

Printing color and graphics
    Select graphics mode: Esc ( G
    Print raster graphics: Esc .
    Select bit image: Esc *
    Reassign bit-image mode: Esc ?
    Select 60-dpi graphics: Esc K
    Select 120-dpi graphics: Esc L
    Select 120-dpi, double-speed graphics: Esc Y
    Select 240-dpi graphics: Esc Z

    Select 60/120-dpi, 9-pin graphics: Esc ^
    Select printing color: Esc r

Control-code character printing
    Print data as characters: Esc ( ^
    Enable upper control code printing: Esc 6
    Cancel upper control code printing: Esc 7
    Enable printing of control codes: Esc I
    Select printing of upper control codes: Esc m

HOUSEKEEPING FUNCTIONS:

Mechanical control
    Control paper loading/ejecting: Esc EM

    Turn continuous unidirectional mode on/off: Esc <
    Turn one-line unidirectional mode on: Esc <
    Sound beeper: BEL
    Disable paper-out detector: Esc 8
    Enable paper-out detector: Esc 9
    Select low-speed mode: Esc s

Data and memory control
    Initialize printer: Esc @
    Cancel line: CAN
    Delete last character in buffer: DEL
    Select printer: DC1
    Deselect printer: DC3

    Set MSB to zero: Esc =
    Set MSB to one: Esc >
    Cancel MSB control: Esc #
    Repeat data: Esc V
    Select immediate print mode: Esc i

Tarotplanet