|
|
Chapter 5.1
- Sequences table and Printfil.ini entries (GDI printing engine)
The table below lists the Printfil's supported Escape Sequences with their default values and the entries
you can use in PRINTFIL.INI to customize them.
CHARACTER OR SEQUENCE |
EFFECT |
PRINTFIL.INI |
13 |
Carriage Return |
|
10 |
Line feed |
|
12 |
Form feed |
|
9 |
Tabulation of the text in fields
(8 characters) |
|
8 |
Delete previously sent character (backspace) |
|
|
This setting is useful to ignore a
sequence on the file (for example printer reset
strings) |
Ignore_Chars |
27,18 |
Set normal font width: 10 cpi. (1) |
Normal_Width |
27,15 |
Set condensed font width: 17 cpi. (1) |
Condensed |
27,87,1 |
Set double-wide font width: 5 cpi. (1) |
Double_Width |
27,16,5 |
Set font width at 8 cpi. (1) |
Cpi8 |
27,16,1 |
Set font width at 12 cpi. (1) |
Cpi12 |
27,16,2 |
Set font width at 14 cpi. (1) |
Cpi14 |
27,16,3 |
Set font width at 15 cpi. (1) |
Cpi15 |
27,16,4 |
Set font width at 20 cpi. (1) |
Cpi20 |
27,119,1 |
Double Height |
Double_Height |
27,119,0 |
Normal Height |
Normal_Height |
27,83,0 |
Superscript on (use Normal_Height to
turn it off) |
Superscript |
27,83,1 |
Subscript on (use Normal_Height to turn it off) |
Subscript |
27,80,1 |
BOLD on |
Bold_on |
27,80,2 |
BOLD off |
Bold_off |
27,80,3 |
ITALICS on |
Italics_on |
27,80,4 |
ITALICS off |
Italics_off |
27,80,5 |
UNDERLINE on |
Underline_on |
27,80,6 |
UNDERLINE off |
Underline_off |
27,80,7 |
Switching Font Start (2) |
Font_Start |
27,80,8 |
Switching Font End (2) |
Font_End |
27,80,11 |
Switching Image Start (3) |
Img_Start |
27,80,14 |
Switching Image End (3) |
Img_End |
27,80,15 |
Switching Color Start (4) |
Color_Start |
27,80,16 |
Switching Color End (4) |
Color_End |
27,80,17 |
Copies Start (5) |
Copies_Start |
27,80,18 |
Copies End (5) |
Copies_End |
(1) The
normal width of the font, as we have previously said, is
computed based on the sheet dimensions and on the number
of characters per row specified in the configuration
dialog or in the FILENAME.CFG.
For example, if we have an A4 sheet, the columns are set
to 80 and the margins are set to 0.5 Cm., we'll have a
width of about 10 cpi. We assume this dimension to be
"normal" (i.e. sending chr(27)+chr(18) ). To
set a font with different dimensions, PRINTFIL will use
the ratio between the normal dimension and the desired
one. For example: Condensed = Normal / 10 * 17 (80
"normal" characters = 80 / 10 * 17 = 136
"condensed" characters in the same space in a
row).
(2) Using this
sequences you can change the font used in the print job.
For example, if in the middle of a job you print
chr(27)+chr(80)+chr(7)+ "Arial" +chr(27)+chr(80)+chr(8),
all the following characters will be printed in Arial
font. To reset the font to the default (the one specified
in PRINTFIL.INI), you have to specify an empty font. i.e.
chr(27)+chr(80)+chr(7) +chr(27)+chr(80)+chr(8). The
Font_End sequence is useful only if you want to print
other characters in the same row, otherwise you can
simply print a chr(10) - Line Feed. For example:
chr(27)+chr(80)+chr(7)+ "Arial" +chr(27)+chr(80)+chr(8)+chr(13)+chr(10)
is the same as chr(27)+chr(80)+chr(7)+ "Arial" +chr(10)
(3) Using this
sequences you can insert a graphical image into the page.
For example, after printing all the text in page 1
(including a chr(12) - Eject, if needed) you can insert
chr(27)+chr(80)+chr(11)+ "C:\BACKGR\LOGO.BMP" +chr(27)+chr(80)+chr(14),
just before to print the text on page 2.
Please note to place it at the beginning of the page,
just before to print the text, so you can eventually
place the text over the bitmap.
You can put more than one bitmap per page concatenating
the sequences. For example:
chr(27)+chr(80)+chr(11)+ "C:\BACKGR\LOGO.BMP|1|1|5|-1" +chr(27)+chr(80)+chr(14)
+
chr(27)+chr(80)+chr(11)+ "C:\BACKGR\SIDEBAR.BMP|10|1|-1|7" +chr(27)+chr(80)+chr(14).
The Img_End sequence is useful only if you want to print
other characters in the same row, otherwise you can
simply print a chr(10) - Line Feed. For example:
chr(27)+chr(80)+chr(11)+ "logo.bmp" +chr(27)+chr(80)+chr(14)+chr(13)+chr(10)
is the same as chr(27)+chr(80)+chr(11)+ "logo.bmp" +chr(10)
For a deeper explanation of the optional parameters to
place the bitmap everywhere on the sheet, please see
chapter 6.
(4) Using this
sequences you can change the font's color.
For example, if in the middle of a job you print
chr(27)+chr(80)+chr(15)+ "255" +chr(27)+chr(80)+chr(16),
all the following characters will be printed in red.
To reset the color to the default (the one specified in
PRINTFIL.INI), you have to specify an empty color. i.e.
chr(27)+chr(80)+chr(15) +chr(27)+chr(80)+chr(16). The
Color_End sequence is useful only if you want to print
other characters in the same row, otherwise you can
simply print a chr(10) - Line Feed. For example:
chr(27)+chr(80)+chr(15)+ "0" +chr(27)+chr(80)+chr(16)+chr(13)+chr(10)
is the same as chr(27)+chr(80)+chr(15)+ "0" +chr(10).
You can specify either the text or the background colors, separing them by a "pipe" ("|" = Ascii-124). For example:
chr(27)+chr(80)+chr(15)+ "0|255" +chr(27)+chr(80)+chr(16) setup the text as black on a red background
For a deeper explanation about the various color's RGB numbers
see the Color setting in Chapter 3:
Configuration
(5) Using
this sequences you can change the number of copies. The "Copies"
parameter works at the entire job level, not for a single page.
If more than a "copies sequence" is present in the print job, Printfil
will apply the last found one to all the pages in the print job.
For example, if in the middle of a job you print
chr(27)+chr(80)+chr(17)+ "2" +chr(27)+chr(80)+chr(18),
the job willbe printed in 2 copies. The Copies_End sequence is needed
only if you want to print other characters in the same row or if
you're using the HP-PCL emulation ( Copies_Start =
chr(27)+chr(38)+chr(108) ). In all the other cases you can simply print
a chr(10) - Line Feed. For example: chr(27)+chr(80)+chr(17)+ "3" +chr(27)+chr(80)+chr(18)+chr(13)+chr(10)
is the same as chr(27)+chr(80)+chr(17)+ "3" +chr(10)
|
|
|