|
DOSPRN 2.0 |
|
|
About | Manual | What's New | Download
| Order | FAQ | Support | Login
|
Sequences description
Sequences are special sets of the ASCII-codes that are used to manage
the information layout being displayed by a printing device. For example, all Epson-compatible printers support sequences of
the ESC-P/ ESC-P2 standard (i.e. Esc-sequences).
Sequences enable changing size and pitch of the printed symbols, horizontal and vertical density of printing, and allow printing of simple graphic objects.
DOSPRN can now emulate dozens of printing features. By default, DOSPRN supports its own sequences palette, but it can emulate some
of the more important ones and often uses the resources of the ESC-P2 and HP PCL standards.
The HP PCL palette can be useful if your DOS program is designed to print on Hewlett Packard
printers, but you don't have such a printer or you want to extend its functionalities.
A new DOSPRN meta language is being developed. This language will allow
us to describe various sequences better.
|
Sequences syntax
Each printing mode enabled in DOSPRN corresponds to one or more
escape sequences (synonyms) in each sequences palette. The language of DOSPRN sequences has some distinctive features.
- each non-printable ASCII-code looks like [#XX], where XX is a code value
- all synonyms are separated by double-pipe symbols (i.e. ||)
- each sequence which contain parameters (fontsize, LPI, CPI, color
etc) should be written in the sequence definition with zeroes or a
number signs in
the curly brackets in parameter's position.
-- If a zero is used, any symbol which is placed by the
DOS-program in sequence will be interpreted as the ASCII string view of the
parameter. For example, if a sequence was defined as
[#27]X{0000}
and the DOS-program sent the string [#27]X1234, then DOSPRN will decide that the parameter is "1234"
-- If a zero with plus is used, any quantity of numeric symbol which is placed by the
DOS-program in sequence will be interpreted as the ASCII string view of the
parameter. For example, if a sequence was defined as
[#27]X{0+}
and the DOS-program sent the string [#27]Y123, then DOSPRN will decide that the parameter is "123"
-- If a number signs is used, any symbol which is placed by the
DOS-program in sequence will be interpreted as a code of this symbol.
For example, if a sequence was defined as [#27]r{#}
and the DOS-program sent the string [#27]r0, then DOSPRN will decide that the parameter is "48" (since 48 is a
code of ASCII symbol '0')
-- If a number signs with plus is used, any quantity of symbols which is placed by the
DOS-program in sequence will be interpreted as a code of this symbol.
For example, if a sequence was defined as
[#27]t{#+}[#00]
and the DOS-program sent the string [#27]t12[#00], then DOSPRN will decide that the parameter is "49"
and "50" (since 49 is a
code of ASCII symbols '1' and 50 is a
code of ASCII symbols '2')
-- If a colon is used, any quantity of previous symbols will be interpreted as a
prefix of compound sequences (PCL)
-- If a semicolon is used, this will be interpreted as a prolongation of
compound sequences (PCL)
|
Default sequences
(Esc) OP |
Select portrait page orientation
|
(Esc) OL |
Select landscape page orientation |
(Esc) P{00} |
Set font width (chars per inch) in xx. By default
accepted xx=12 |
(Esc) L{00} |
Set font height (lines per inch) in xx. By default
accepted xx=06 |
(Esc) C${000000} |
Set text color where xxxxxx
is standard RGB color description in hex |
(Esc) F{00} |
Set font size in xx. By default accepted xx=10 |
(Esc) X{0000} |
Set absolute horizontal
position in 1/720" units |
(Esc) Y{0000} |
Set absolute vertical
position in 1/720" units |
(Esc) B |
Set bold font style |
(Esc) b |
Unset bold font style |
(Esc) I |
Set italic font style |
(Esc) i |
Unset italic font style |
(Esc) U |
Set underline font style |
(Esc) u |
Unset underline font style |
(Esc) S |
Set strikeout font style |
(Esc) s |
Unset strikeout font style |
|
Epson ESC-P2 emulation sequences
(Esc) E or (Esc) G |
Set bold font style |
(Esc) F or (Esc) H |
Unset bold font style |
(Esc) 4 |
Set italic font style |
(Esc) 5 |
Unset italic font style |
(Esc) -1 or (Esc) -#1 |
Set underline font style |
(Esc) -0 or (Esc) -#0 |
Unset underline font style |
(Esc) P |
Pica font style (10 cpi) |
(Esc) M |
Elite font style (12 cpi) |
#14 or (Esc) #14 |
Double font width (Up to the end of a
line) |
#20 |
Normal font width |
(Esc) W1 or (Esc) W #1 |
Double font width (Up to the special
cancellation) |
(Esc) W0 or (Esc) W #0 |
Double font width cancel |
(Esc) w1 or (Esc) w #1 |
Double font height (Up to the special
cancellation) |
(Esc) w0 or (Esc) w #0 |
Double font height cancel |
(Esc) g_ |
Select 15 CPI mode |
#15 or (Esc) #15 |
Condensed fonts |
#18 |
No condensed fonts |
(Esc) rx |
Set text color where x is ASCII code:
#0 -- black |
#1 -- magenta |
#2 -- cyan |
#3 -- violet |
#4 -- yellow |
#5 -- red |
#6 -- green |
|
|
(Esc) S0 or (Esc) S#0 |
Set superscript printing mode |
(Esc) S1 or (Esc) S#1 |
Set subscript printing mode |
(Esc) T |
Cancel superscript or subscript printing mode |
(Esc) B |
Set vertical tabs |
#11 |
Tab vertically |
(Esc) D |
Set horizontal tabs |
#9 |
Tab horizontally |
(Esc) K{##} |
Select 60 dpi graphics |
(Esc) L{##} or (Esc) Y{##} |
Select 120 dpi graphics |
(Esc) Z{##} |
Select 240 dpi graphics |
|
HP PCL emulation sequences
(Esc) (s3B or (Esc) (s1B |
Set bold font style |
(Esc) (s0B |
Unset bold font style |
(Esc) (s1S |
Set italic font style |
(Esc) (s0S |
Unset italic font style |
(Esc) &d1D |
Set underline font style |
(Esc) &d@ |
Unset underline font style |
(Esc) (s1U |
Set superscript printing mode |
(Esc) (s-1U |
Set subscript printing mode |
(Esc) (s0U |
Cancel superscript or subscript printing mode |
(Esc) (s{0+}H |
Set font width (chars per inch) in xx. By default
accepted xx=12 |
(Esc) &l{0+}D |
Set font height (lines per inch) in xx. By default
accepted xx=06 |
(Esc) &a{0+}H |
Set absolute horizontal
position in 1/720" units |
(Esc) &a(0+}V |
Set absolute vertical
position in 1/720" units |
(Esc) &l{0+}E |
Top margin (lines) |
(Esc) &l{0+}F |
Text length (lines) |
(Esc) &a{0+}L |
Left margin (cols) |
(Esc) &a{0+}M |
Right margin (cols) |
|
About | Manual | What's New | Download
| Order | FAQ | Support | Login
|