home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_2.iso
/
files
/
694a.lha
/
APrfII_v2.00
/
APrfEnglish.doc.pp
/
APrfEnglish.doc
Wrap
Text File
|
1992-11-16
|
36KB
|
1,025 lines
APrf2 v2.00 - User's Guide
This file describes release 2.00 of the utility APrf2. This program
is (c)1989-1990-1991-1992 by Denis GOUNELLE, any commercial usage or
selling without author's written authorization is strictly forbidden. You
can copy and spread this program at the following conditions:
- all the files must be provided
- none of the file must have been modified
- you don't charge more than $6 for copy fee
"PowerPacker 2.3b" is (c)1989 by PowerPeak and Nico FRANCOIS.
"PowerPacker Pro 3.0b" is (c)1990 by PowerPeak and UGA SoftWare. The
"powerpacker.library" library is (c)1990 by Nico FRANCOIS. AREXX is
(c)1987 by William Hawes. The "reqtools.library" library is (c)1990-1991
by Nico FRANCOIS.
No warranty is made that there's no errors in APrf. YOU USE THIS
PROGRAM AT YOUR OWN RISKS. In no event will I be liable for any damage,
direct or indirect, resulting of the use of APrf.
Table of contents:
------------------
1. Introduction.
2. User's guide
2.1 Running APrf from the CLI.
2.2 Running APrf from WorkBench.
2.3 Getting started.
2.4 Gadgets.
2.5 Menus.
2.6 Header and footer.
2.7 The preview function.
2.8 Modifying page selection.
3. Advanced concepts.
3.1 Using "powerpacker.library".
3.2 The "eXpress" mode.
3.3 The AREXX mode.
3.4 The application window (AppWindow).
3.5 The "APrf.Init" file.
4. Memory management
4.1 The file to print.
4.2 The output buffer.
4.3 Memory requirements.
5. Miscellaneous.
1. Introduction.
----------------
APrf2 is a new version of APrf which can use the new functions of
2.0 system release. This program still works under 1.3 system release, but
without offering some of the new features.
APrf is a printing utility, which allows to add an header or a
footer, to set up margins, to have a multi-columns output, etc... and uses
your Preferences settings. It also have an AREXX-compatible message port,
an application window (or "AppWindow", under 2.0 system release only) and
can load files compressed with "PowerPacker 2.3b" or "PowerPacker Pro
3.0b".
You can send me your suggestions and criticism writing to:
M. GOUNELLE Denis
Boite 71
6, rue des cailloux
92110 CLICHY - FRANCE
Many thanks to Serge HAMMOUCHE, Jean-Yves PROUX, Jean-Philippe
RAPP, Jean ROUGELIN, Michel SCHINZ, and Pierre VITET for tests and ideas.
2. User's guide.
----------------
APrf can be run from Workbench or from the CLI. In the latter case
there's no need to use a "RunBack" or "ARun" utility, as APrf will detach
itself from the CLI window.
2.1 Running APrf from the CLI.
------------------------------
From the CLI, APrf is invoked using some arguments to modify the
default options. The command line is of the form:
APrf [filename][-c#][-f#,#][-l#][-n#][-oF][-p#][-r#][-s#][-t#]
[-x#][-A][-Cseq][-D#][-F{L|C|R}fmt][-H{L|C|R}fmt][-Ifont]
[-N#][-Oopts][-P{p|e|f}][-Spages][-X]
If you specify the filename argument, the corresponding file will
be taken as the file to print. Here's a description of the other
arguments:
-c# (Columns number)
Prints file in # columns.
Default value: # = 1
Minimal value: # = 1. Maximal value: # = 999.
-f#,# (page Format)
Selects page format and pages where to print header
and/or footer. The first # can be one of:
0 : nothing
1 : header
2 : footer
3 : both header and footer
Default value: # = 1.
The second # can be one of:
0 : on all pages
1 : on all pages but the first
2 : on even pages
3 : on odd pages
Default value: # = 0.
You can modified only one of these parameters : the
"-f1,2", "-f1" and "-f,2" forms are accepted.
See section 2.6 for more information.
-l# (Left margin)
Sets a left margin of # characters. Note that the
margins set up in Preferences is ALWAYS used.
Default value: # = 0
Minimal value: # = 0. Maximal value: # = 999.
-n# (line Numbering)
Numbers lines with # digits numbers.
Default value: # = 0 (no line numbers).
Minimal value: # = 0. Maximal value: # = 10.
-oF (Output)
Printing will be re-directed to file F.
-p# (Page length)
Sets page length to # lines.
Default value: "Paper length" set up in Preferences.
Minimal value: # = 5. Maximal value: # = 999.
-r# (Right margin)
Sets a right margin of # characters. Note that the
margins set up in Preferences is ALWAYS used.
Default value: # = 0
Minimal value: # = 0. Maximal value: # = 999.
-s# (column Spaging)
Columns are separated by # spaces.
Default value: # = 1
Minimal value: # = 1. Maximal value: # = 999.
-t# (Tabulation)
Sets tabulation stop positions to #+1, 2#+1, 3#+1,
etc..
Default value: # = 8.
Minimal value: # = 1. Maximal value: # = 999.
-x# (copies)
Prints # copies of the file.
Default value: # = 1
Minimal value: # = 1. Maximal value: # = 999.
-A (Arexx mode)
Sets AREXX mode (see section 3.3 for more information).
-Cseq (Control sequence)
Selects the control sequence "seq" (see section 3.5
for more information).
-D# (Date format)
Sets date format in header. # can be one of:
0 : AmigaDOS format (dd-mmm-yy)
1 : International format (yy-mm-dd)
2 : American format (mm-dd-yy)
3 : European format (dd-mm-yy)
Default value: # = 0.
See section 2.6 for more information.
-F{L|C|R}fmt (Footer format)
Specifies page footer format.
See section 2.6 for more information.
-H{L|C|R}fmt (Header format)
Specifies page header format.
See section 2.6 for more information.
-Ifont (Internal font)
Select the given font.
See section 3.5 for more information.
-N# (page Numbers)
Sets first page number to #.
Default value: # = 1.
Minimal value: # = 1. Maximal value: # = 899.
-Oopts (Options)
Allows you to modify several options. opts can be any
combination of :
l letter quality
d draft quality
8 8 LPI spacing
6 6 LPI spacing
F fanfold paper
S single sheet paper
t truncate too long lines
f control characters filter
a ANSI sequences filter
k output buffer size of 1 Kbytes
n don't send "Form Feed"
u underline header
See the description of "Options" menu, at section 2.5, for
further informations.
-P{p|e|f} (print Pitch)
Selects print pitch :
-Pp for "pica" pitch
-Pe for "elite" pitch
-Pf for "fine" pitch
Default value : "Pitch" set up in Preferences.
-Spages (Selection)
Selects the pages to print. pages can be one of :
x : only page x
x-y : from page x to y
x,y,z,... : pages x,y,z,... (up to 16 pages)
You can also use the two last forms together, as in
"-S1,3,5-8".
CAUTION: the page numbers that you specify for page
selection must depend of the first page
number (see -N option)
-X (eXpress)
Sets "eXpress" mode (see section 3.2 for further
information).
If you make an error in your command line, a window will appear on
the Workbench screen, with the message "Bad arguments". Click in the "OK"
gadget to make the window disappear, and correct your command line. Then,
run APrf once more.
The "Tools" menu has a command that gives the command line
corresponding to the current option settings (see section 2.5 for further
information).
2.2 Running APrf from Workbench.
--------------------------------
There's three ways to run APrf from Workbench, if you want to
specify the files that hare to be printed:
- by double-clicking on a "Project" icon whose "Default tool"
is APrf
- by clicking on one or more file icons, holding down the SHIFT
key, and double-clicking on APrf icon
- by clicking on APrf icon (and if required on some file icons),
holding down the SHIFT key, and double-clicking on a file icon
In any case, the selected files are transmitted to APrf. The
program will display the first filename in the "File to print" gadget (see
section 2.4). The "Next file" command in the "Project" menu allows you to
skip to the next file (see section 2.5), and the "Default options" command
in the "Tools" menu allows to go back to the first file in the files list
(see section 2.5).
As when you run APrf from the CLI, you can give some arguments to
modify default options. To do this, click on a file icon and select the
"Information" item in the "Icons" menu (on Workbench screen). Then click
on the "New" gadget in the "TOOL TYPES" field, and add the arguments
according to the following syntax:
APRF=[-c#][-f#,#][-l#][-n#][-oF][-p#][-r#][-s#][-t#][-x#]
[-Cseq][-D#][-F{L|C|R}fmt][-H{L|C|R}fmt][-Ifont]
[-N#][-Oopts][-P{p|e|f}][-Spages]
These options are described in section 2.1. If you run APrf from
Workbench without arguments (i.e. if you just click twice on APrf's icon)
options will be taken from "TOOL TYPES" field of APrf's project icon.
Please notice that -A (AREXX mode) and -X (eXpress mode) options
can't be specified when running APrf from Workbench.
2.3 Getting started.
--------------------
APrf needs "reqtools.library" v2.0c, so you must copy it in your
"LIBS:" directory (if not done yet) before trying to run this program.
If all goes well, a new screen will be opened, and you'll see
several gadgets. The AREXX port is also opened (see section 3.3). Under
2.0 system release, APrf will always open the application window (see
section 3.4).
Otherwise, a window will appear on Workbench screen with a message
telling you what a problem occurred. Click in the "OK" gadget to make the
window disappear, APrf stops and returns a value of 10 (ERROR, see "IF"
command of AmigaDOS).
APrf can return a value of 10 without displaying any message, in
only three situations:
- APrf couldn't open "reqtools.library"
- APrf couldn't open the error window
- APrf couldn't open the Workbench screen
Now, I will suppose that APrf is running well. The two following
sections are going describe the gadgets and menus of APrf. If you are
using APrf for the first time I suggest to run the program, in order to
understand these explanations.
2.4 Gadgets.
------------
This section describes all the gadgets displayed on the screen,
from the left top corner to the right bottom one:
File to print:
This gadget shows the name of the file to print.
To modify its value just click on it: a file requester will
appear. If you click on the CANCEL gadget of this requester,
or on the OK gadget without giving a file name, the previous
name won't be modified.
A '*' character will appear on the right of the file name,
when the file is loaded in memory (see section 4.1).
Output file:
This gadget shows where a file will be printed.
Default value is "PRT:", but can be changed with -o option
(see section 2.1).
To modify its value just click on it: a file requester will
appear. If you click on the CANCEL gadget of this requester
the output file will become "PRT:".
Page selection:
This gadget shows which pages will be printed.
Default value is "*" (all the pages), but can be changed
with -S option (see section 2.1).
Please refert to section 2.8 to see how to modify the
selection.
The nine next gadgets allow to specify respectively: the left
margin size, the right margin size, the tabulation size, the number of
lines per page, the first page number, the line numbers size, the number
of columns, the column spacing, and the number of copies that have to be
printed.
Each gadget shows the current value of its corresponding parameter.
You can click on the value to modify it with the keyboard (press Amiga-X
to erase the old value, don't forget to press RETURN to validate the new
value). You can also increase the current value by clicking on the up
arrow, and decrease it by clicking on the down arrow. If a value doesn't
change, you have reached the lower or the higher limit ! As long as you
keep the left mouse button down, the value will be increased or decreased.
Left margin: (see -l option in section 2.1)
Default value: 0
Lowest value : 0
Highest value: 999
Right margin: (see -r option in section 2.1)
Default value: 0
Lowest value : 0
Highest value: 999
Tabulation: (see -t option in section 2.1)
Default value: 8
Lowest value : 1
Highest value: 999
Page length: (see -p option in section 2.1)
Default value: "Paper length" set up in Preferences
Lowest value : 5
Highest value: 999
First page number : (see -N option in section 2.1)
Default value: 1
Lowest value : 1
Highest value: 899
NOTE : page selection will be lost each time you
will change the first page number.
Line numbers : (see -n option in section 2.1)
Default value: 0 (no line numbers)
Lowest value : 0 (no line numbers)
Highest value: 10
Columns: (see -c option in section 2.1)
Default value: 1
Lowest value : 1
Highest value: 999
Col. Spacing: (see -s option in section 2.1)
Default value: 1
Lowest value : 1
Highest value: 999
Copies : (see -x option in section 2.1)
Default value : 1
Lowest value : 1
Highest value : 999
The four next gadgets are used to choose a value between severals
one. Use the arrow-like gadget at the right of the value to change it. If
you hold down one of the SHIFT keys when selecting the gadget, the values
will change in reverse order.
Print pitch:
This gadget indicates print pitch.
Default value is taken from "Pitch" set up in Preferences,
but can be changed with -P option (see section 2.1).
Font:
This gadget indicates the font to use.
Usually it's the defaut font, but this can be changed with -I
option (see section 2.1).
For more information, see section 3.5.
Date format:
This gadget shows the date format in the header (see section
2.6). By default, the format is the AmigaDOS format, but this
can be changed with -D option (see section 2.1).
Page format:
This gadget shows the selected page format (see section 2.6).
By default, the format is "header", but this can be changed
with -f option (see section 2.1).
on:
This gadget shows on which pages header and/or footer will be
printed (see section 2.6)
By default, its value is "all pages", but this can be changed
with -f option (see section 2.1).
The next gadgets allows you to personnalize the header and the
footer.
Header:
This gadget shows the format of the three parts of the
header : the left part, the central part, and the right
part.
Default value of each part can be changed with -H option
(see section 2.1).
To modify the value of any part just click on it : a window
with a string gadget will appear. Press Amiga-X to erase
current value, RETURN to validate, or click on the window
close gadget to abort.
For more information, see section 2.6
Footer:
Same as header gadgets, but for the footer.
Default value of each part can be changed with -F option
(see section 2.1).
For more information, see section 2.6
The two diamond-shaped gadgets on the bottom of the screen allows
you to start printing (left gadget) or previewing (right gadget) without
having to play with the menus.
You can also click on the main window's close gadget (upper left
corner) to quit the program, or on the "zoom" gadget (upper right corner,
under 2.0 system release only) to iconify APrf.
2.5 Menus.
----------
APrf has three menus: "Project", "Tools" and "Options". Each
command can be selected by mouse or by a keyboard shortcut, but "Options"
menu items must be selected by mouse. Here are the options of the
Project" menu:
"Next file" command (Amiga-N):
If you have run APrf from Workbench and selected several
icons, this command allows you to skip to the next file
in the list of selected files.
The "File to print" gadget is updated (see section 2.4),
and the old file is removed from memory (if it had been
loaded, see section 4.1).
"Print" command (Amiga-P):
Start printing.
"Palette..." command:
Allows to modify APrf screen's colors.
To save the new palette immediatly, select the "Save
config" command and enter "palette" as a configuration
name. Otherwise, when you will quit the program, APrf
will ask you if you want to save the new palette.
"About..." command (Amiga-?):
Displays some informations about APrf.
To close the window, click inside it or press any key.
"Iconify" command (Amiga-I):
APrf goes sleeping, freeing at least 32 Kb of CHIP
memory and some other workspace (the current file is
removed from memory if it had been loaded). The screen
is closed and, under 1.3 system release, a small window
which title is "APrf2 v2.00" will appear on the top left
corner of the Workbench's screen. Under 2.0 system
release, the application window remains opened. In both
cases, AREXX messages are still waited for.
To awake APrf, you must activate this window and click
then on the right mouse button. You can quit APrf without
having to awake it by clicking on the close gadget of the
small window.
"Quit" command (Amiga-Q or ESCAPE):
Quit APrf.
A requester will apear: click on "YES" to confirm, or on
"NO" to cancel.
Here are the commands of the "Tools" menu:
"Default Options" command (Amiga-D):
Restores the default options (first it loads Preferences
then it scans the command line).
If you have run APrf from Workbench and selected several
icons, the first file of the list becomes the file that
will be printed.
This command may be useful, for example, if you modify
the Preferences settings and want APrf to know about it,
without having to quit the program.
"Load file" command (Amiga-L):
Loads immediately the file to print in memory. If the
file was already in memory, yet this command reload it
(see section 4.1).
"Unload file" command (Amiga-U):
Removes the file to print from memory.
(see section 4.1).
"Preview" command (Amiga-V):
Activates the preview function (see section 2.7).
"Command line" command (Amiga-K):
Displays the argument list that you have to give in
order to make the current options beeing the default
options.
To close the window, click inside it or press any key.
"Save config" command (Amiga-S):
Save the current options (except the name of the file to
print) in a new line of the "S:APrf.Init" file. A window
appears, and you must enter the name of the new
configuration. Close the window to cancel the operation.
See section 3.5 for other informations.
"Doc Info" command (Amiga-X):
Displays the page, line and character counts of the
output file. Please notice that the character count will
always be an approximation.
To close the window, click on the "OK" gadget.
Here are the items of the "Options" menu:
"Letter" item:
Selects the printing quality: "letter" or "draft".
Default value is taken from "Print Quality" set up in
Preferences, but can be changed with -O option (see
section 2.1).
"8 LPI" item:
Selects line spacing: "8LPI" or "6PLI"
Default value is taken from "Spacing" set up in
Preferences, but can be changed with -O option (see
section 2.1).
"Fanfold" item:
Selects paper type: "fanfold" or "single"
Default value is taken from "Pitch" set up in
Preferences, but can be changed with -O option (see
section 2.1).
"Truncate" item:
If active, too long lines are truncated instead of being
wrapped on several lines.
By default, it is not active, but this can be changed
with -O option (see section 2.1).
"CTRL filter" item:
If active, the control characters (ASCII code lower than
32 or greated than 126) found in the file to print are
not send to the printer.
By default, it is not active, but this can be changed
with -O option (see section 2.1).
"ANSI filter" item:
If active, the ANSI sequences described in section 6
are not send to the printer.
By default, it is not active, but this can be changed
with -O option (see section 2.1).
"Buffer 1Kb" item:
If active, the output buffer size will be 1 Kb (instead
of one page)
By default, it is not active, but this can be changed
with -O option (see section 2.1).
See section 4.2 for more information.
"Send FF" item:
If active, a "Form Feed" character is send each time the
bottom of the page is reached.
By default, it is active, but this can be changed with
-O option (see section 2.1).
"Und. header" item:
If active, the header will be underlined.
By default, it is not active, but this can be changed
with -O option (see section 2.1).
2.6 Header and footer.
----------------------
APrf can add a header, a footer, or both, on your documents. The
choice can be made when calling APrf (-f option, see section 2.1) or with
the "Page format" gadget (see section 2.4). A header or a footer takes to
line on the page.
When you ask for a header (and/or a footer) format, APrf uses the
values of the "Header" (and/or "Footer") gadgets to build this header
(and/or footer). The left gadget shows what will be on the left, the
central gadget what will be centered, and the right gadget what will be on
the right. Format specifications can include the following sequences :
%a name of the day (e.g. "Monday")
%b name of the month (full, e.g. "September")
%B name of the month (short, e.g. "Sep")
%d day of the month (01 to 31)
%D date as shown by the "Date format" gadget
%f basename of the file (e.g. "foo")
%F full name of the file (e.g. "RAM:Test/foo")
%h hour (00 to 11)
%H hour (00 to 23)
%m month of the year (01 to 12)
%M minutes (00 to 59)
%n page number
%p period of the day (AM or PM)
%s file size in bytes
%S seconds (00 to 59)
%v program release (e.g. "APrf v4.10")
%w day of the week (0 to 6)
%x copy number
%y year of the century (00 to 99)
%% % (not guaranted to work...)
Default value for header is "%f" for the left part, "Page %n" for
the central part, and "%D" for the right part. Default value for footer is
"Page %n" for the central part, and nothing for the other parts.
You can also specify your own header (and/or footer) format, by
clicking on the gadget corresponding to the part you want to modify, or
(when starting APrf) with -H (and/or -F) option : "-HLformat" modifies
left part of the header, "-HCformat" modifies central part, and
"-HRformat" modifies right part.
Last, you can select on which pages you want header and/or footer
to be printed, by clicking on the "on" gadget (see section 2.4) or with -f
option (see section 2.1).
2.7 The preview function.
-------------------------
This function allows you to see how will look the final aspect of
a text, depending upon the current option settings. To use it, first set
up your printing settings, then choose the "Preview" command from the
"Tools" menu. A window will appear in the middle of your screen, and shows
how will look the first selected page (window size is shaped by the page
size).
To look the next page, click inside the window or press RETURN. To
stop, click on the window's close gadget or press ESCAPE.
Please notice that APrf won't be able to open the preview window
if page length value is very high : highest value for page length is 93
lines in NTSC mode (122 in PAL mode).
2.8 Modifying page selection.
-----------------------------
To modify page selection, click on the "Selected pages" gadget: a
window will appear in the midle of the screen, showing a grid with one
hundred numbers, each number corresponding to a page number. These numbers
are written on a white background if the corresponding page is selected,
or on a blue background if not.
If you click on a number, you will change the selection for the
corresponding page. You can also use the following gadgets:
ALL select all pages
INVERT reverse selection
NONE no page selected
OK accept new selection (or RETURN)
UNDO undo all changes (takes back old selection)
CANCEL abort modification (or ESCAPE)
There's also a string gadget, in which you can enter a selection
specification. This new selection will be added to the current one. Licits
values for the string are:
* all the pages
x page x only
x-y from page x to y
x,y,z,... pages x,y,z,...
You can also use the two last forms together, e.g. "1,3,5-8".
Don't forget that page selection depends of the first page number,
and that you won't be allowed to enter an empty selection (that is, with
no page selected).
3. Advanced concepts.
---------------------
This section deals with some powerful features of APrf, that
allows it to be fully integrated in your working environment.
3.1 Using "powerpacker.library".
--------------------------------
APrf can use "powerpacker.library" according you have installed it
in the "LIBS:" directory of your hard disk or Workbench disk. This allows
you to print any files compressed with "PowerPacker 2.3b" or "PowerPacker
Pro 3.0b": the file will be decompressed automatically at loading. If data
file has been encrypted, APrf will ask for a password.
3.2 The "eXpress" mode.
-----------------------
It can happen that you want to print a file quickly, without using
the Intuition interface (if your Preferences are correctly set, it should
be frequent).
If you specify -X option when calling APrf, once the command line
has been parsed, printing starts immediatly. APrf doesn't open any screen,
and stops when printing is done. Error messages are displayed in a special
window, on WorkBench's screen.
3.3 The AREXX mode.
-------------------
When starting, APrf always open an AREXX compatible port, nammed
"APrf_rexx", and waits for messages on this port. Valid messages are :
quit : APrf closes the message port and terminates.
wakeup : APrf closes the message port and open its screen.
reset : APrf loads Preferences and sets all options to their
default values
load : APrf loads the file to print
print : APrf starts printing
Any other message will be considered as a command line, and scaned
as described in section 2.1. If any error occurs, APrf will display a
message on the WorkBench's screen, and terminates.
If you send a "load" message and APrf don't know which file is to
load, your command won't have any effect.
Here is an exemple of AREXX program, which print the "S:Startup-
Sequence" file with a left margin of 10 characters, and terminates APrf :
/* Print S:Startup-Sequence */
address "APrf_rexx"
"S:Startup-Sequence -l10"
"print"
"quit"
Please note the " characters arround commands !
If you specify -A option when calling APrf, it will go in AREXX
mode: only the application window (under 2.0 system release) or the
iconification window (under 1.3 system release) is opened, and the program
works the same way as when iconified. From the Intuition interface you can
go in AREXX mode just by selecting the "Iconify" command in the "Project"
menu (see section 2.5).
3.4 The Application Window (AppWindow).
---------------------------------------
When running under 2.0 system release, APrf automatically opens an
application window (also called "AppWindow") on the Workbench screen. Then
you will have the following possibilities:
- if you select one or several icons and drop them over the
application window, APrf will eventually open it's screen, put
it to front, and you will be able to print the file(s) as if you
started the program from Workbench.
- if you click on the close gadget of the application window, the
program will stop running (no confirmation in AREXX mode)
- if you activate the application window and click on right mouse
button, APrf will open it's screen and normal interface will
be accessible (same as sending "wakeup" command from AREXX)
Take notice that the application window replaces the iconification
window.
3.5 The "APrf.Init" file.
-------------------------
When starting, APrf tries to load the "S:APrf.Init" file. This
file allows you to define typical configurations and/or fonts. To define a
typical configuration, you add a line of the form:
name:options:sequence
where "name" and "options" are strings of characteres ("name" shouldn't be
longer than 8 characters), and "sequence" is a list of decimal codes
separated by spaces. "options" and/or "sequence" strings may be empty.Only
the 8 first configurations will be used. Here are two examples:
my8lpi:-p90 -O8:
landscap:-p80:27 48 108 72
Each name you gave will appear in a new "Control" menu. If you
select one of these names, the "options" string will immediatly be parsed
as a CLI command line. Also, at printing time, the characters whose ASCII
code is given in the corresponding sequence will be send to the printer
(after the initialisation sequences, but before the text itself). You can
select several names at the same time.
When calling APrf from the CLI or from the WorkBench, the -C
option allows you to select a sequence at startup time. The "option"
string will be parsed after the other calling options. If the sequence you
specified in the -C option doesn't exist, the option will be ignored.
The "S:APrf.Init" file can also give you access, from APrf, to the
internal fonts of your printer. To define a font, you add a line of the
form:
fontdef:name:sequence
where "name" is the name of the font, and "sequence" the list of codes to
send to your printer to select the given font. Exemple :
fontdef:Prestige:27 107 2 27 120 49
You can enter any number of font. Font definitions should be specified at
the beginning of the file, before typical configurations definitions. To
select a font, use either the -I option (see section 2.1) or the "Font"
gadget (see section 2.4).
Another line format allows to specify APrf screen's colors. The
format is:
palette: c1 c2 c3 c4
where "c1", "c2", "c3", "c4" are RGB color specifications. These values
can be in decimal or in hexadecimal (in the latter case, add "0x" before
the value, like "0x0F00"). If there are several palette specifications,
only the last will be used.
You can put empty lines in the "S:APrf.Init" file. Any line
beginning with a semicolon character (";") is supposed to be a comment and
is not interpreted.
The "S:APrf.Init" file will be loaded again each time you select
the "Default options" command in the "Tools" menu. In "eXpress" mode (see
section 3.2), the file "S:APrf.Init" will be loaded only if required (i.e.
if you specified a -C or a -I option). Take notice that the sequences will
be written with a PRD_RAWWRITE command, so they won't be interpreted by
the printer device.
4. Memory management.
---------------------
This section describes how APrf manages the memory space.
4.1 The file to print.
----------------------
Before printing or previewing a file, APrf loads it in memory.
Once the file has been printed or previewed, it is kept in memory in
prevision of another print or preview operation. The great advantage is
that APrf has not to load a file each time you ask for previewing it, or
when you ask for printing it after a preview.
A file is removed automatically from memory either if you iconify
APrf (see section 2.5), or if you choose to print another file (see
section 2.4), or if you select the "Next file" command from the "Project"
menu (see section 2.5). It can be removed too (but not always) if you
select the "Default options" command from the "Tools" menu.
In addition, the "Load file" command from the "Tools" menu
enforces APrf to load a file (this will be reloaded even if it was already
in memory), while the "Unload file" command in the "Tools" menu makes APrf
to unload a file from memory.
Now, to let you know if a file is or isn't loaded in memory, APrf
displays a "*" character on the right of the file name when this file is
actually loaded in memory.
This behaviour can present two inconvenients.
First of all, a file occupies memory even if you don't need it
anymore. A solution is to iconify APrf (see section 2.5) or to select the
"Unload file" command from the "Tools" menu.
The second inconvenient is that if you modify a file on your disk,
any changes could be ignored, because APrf don't load the file again. In
order to avoid this, if APrf sees that the file has been modified, it will
ask you if you want to reload it.
4.2 The output buffer.
----------------------
APrf uses an output buffer in order to make less "write" commands.
With a 1 Kb buffer, printing to a file is twice faster than with the first
releases of APrf whose buffer contained only one line. Even if printing to
printer doesn't seem to be faster, the number of "write" commands is
divided at least by 5 (at most by 14 or 15). Tests have shown that system
charge was greatly reduced, and that THE OTHER TASKS WERE LESS SLOWED DOWN.
By default, APrf uses an output buffer of one page (see section
2.5, "Buffer" option from the "Options" menu). When you change your page
size, the output buffer is automatically re-allocated in order to store a
whole page. If there's not enough memory to allocate this one page buffer,
APrf will try to allocate a 1 Kbytes buffer (a message will inform you
about this). If there's still not enough memory, APrf will stop with an
error message "Not enough memory".
4.3. Memory requirements.
-------------------------
When you run APrf, you need a bit more than 100 Kbytes of memory
for code, data and Intuition interface. Any operation on the file to print
(printing, previewing, etc...) will cause this file to be load into
memory, and a working buffer of (PageLength * LineLength) bytes to be
allocated. Printing will also require an output buffer of one page, or one
Kbytes.
5. Miscellaneous.
-----------------
This section is a bric-a-brac of some informations that didn't
find a place in previous sections. It deals with some importants points
concerning how APrf works. I strongly advise you to read it once at least
and to remind to read it again if you think APrf is working oddly.
If "Fanfold" option is not activated, here is the behaviour of
APrf: before printing a page, the program displays a requester asking you
to insert a new sheet of paper in your printer. When you're ready, click
on "YES" to print the page. If you click on "NO" printing will be aborted.
You can abort printing at any time, by clicking in the box where
the current copy and page numbers are displayed. A requester will appear,
asking you confirmation: click on "YES" to stop printing and click on "NO"
to resume printing.
If you abort printing, APrf will immediatly stop to send data to
the printer, and wait for the last write request to be finished (this can
be quite long !).
To make your files have a better looking, you can include the
following ANSI sequences:
ESC[0m Normal character set
ESC[3m Italics on
ESC[23m Italics off
ESC[4m Underline on
ESC[24m Underline off
ESC[1m Boldface on
ESC[22m Boldface off
ESC[1"z Draft quality
ESC[2"z NLQ quality
All these sequences will be sent to your printer, but the
characters that compose them will neither be retained, nor be displayed
when APrf is in preview mode. Any other sequences will be not recognized
and will be considered as part of text to be printed. You can filter these
sequences if you don't want them to be send to the printer (see section
2.5, "ANSI filter" item in "Options" menu).
The size of these sequences is limited to 32 characters by OUTPUT
line (not input line !), i.e. to 6 or 8 sequences, which should be
sufficient in most case. If there's too much sequences on an output line,
the error message "Lines too long, printing aborted" will be displayed.