home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / anim / players / avplayer.lzh / APrintF / APrf.doc < prev    next >
Text File  |  1992-08-05  |  34KB  |  966 lines

  1.  
  2.             APrf2 v1.30 - User's Guide
  3.  
  4.  
  5.  
  6.  
  7.  
  8.     This file describes  release  1.30  of    the  utility  APrf2.  This
  9. program is freeware, and permission is granted to  freely  distribute  and
  10. copy it, provided no charge or fee is ask for, and no modification is done
  11. to this package.
  12.  
  13.     APrf is copyright (c)1989-1990-1991-1992 by Denis  GOUNELLE,   any
  14. commercial usage or selling of this program, without  written  permission,
  15. is ABSOLUTLY FORBIDEN. By mutual agreement, Serge HAMMOUCHE is    authorized
  16. to distribute APrf as he likes.
  17.  
  18.     "PowerPacker 2.3b" is (c)1989  by  PowerPeak  and  Nico  FRANCOIS.
  19. "PowerPacker Pro 3.0b" is  (c)1990 by  PowerPeak  and  UGA  SoftWare.  The
  20. "powerpacker.library" library  is  (c)1990  by  Nico  FRANCOIS.  AREXX  is
  21. (c)1987 by William Hawes.
  22.  
  23.      No warranty is made that there's no errors in APrf. YOU USE  THIS
  24. PROGRAM AT YOUR OWN RISKS. In no event will I be liable  for  any  damage,
  25. direct or indirect, resulting of the use of APrf.
  26.  
  27.  
  28. Table of contents:
  29. ------------------
  30.  
  31.     1. Introduction.
  32.     2. User's guide
  33.        2.1 Running APrf from the CLI.
  34.        2.2 Running APrf from WorkBench.
  35.        2.3 Getting started.
  36.        2.4 Gadgets.
  37.        2.5 Menus.
  38.        2.6 Header and footer.
  39.        2.7 The preview function.
  40.        2.8 Modifying page selection.
  41.     3. Advanced concepts.
  42.        3.1 Using "powerpacker.library".
  43.        3.2 The "eXpress" mode.
  44.        3.3 The AREXX mode.
  45.        3.4 The "APrf.Init" file.
  46.     4. Memory management
  47.        4.1 The file to print.
  48.        4.2 The output buffer.
  49.        4.3 Memory requirements.
  50.     5. Miscellaneous.
  51.  
  52.  
  53. 1. Introduction.
  54. ----------------
  55.  
  56.     APrf2 is a new version of APrf which can use the new functions    of
  57. 2.0 system release. This program still works under 1.3 system release, but
  58. without offering some of the new features.
  59.     APrf is a text file printing utility, developped  for  the  Amiga.
  60. This program allows to add an header or a footer in  a    page,  to  set    up
  61. margins, to have a multi-columns output, etc... and uses your  Preferences
  62. settings. It also have an AREXX-compatible  message  port,  and  can  load
  63. files compressed with "PowerPacker 2.3b" or "PowerPacker Pro 3.0b".
  64.  
  65.     You can send me your suggestions and criticism writing to:
  66.  
  67.               M. GOUNELLE Denis
  68.                   Boite  71
  69.              6, rue des cailloux
  70.             92110 CLICHY - FRANCE
  71.  
  72.     Many thanks to Serge HAMMOUCHE, Jean-Yves  PROUX,  Jean  ROUGELIN,
  73. Michel SCHINZ, and Pierre VITET for tests and ideas.
  74.  
  75.  
  76. 2. User's guide.
  77. ----------------
  78.  
  79.     APrf can be run from Workbench or from the CLI. In the latter case
  80. there's no need to use a "RunBack" or "ARun" utility, as APrf will  detach
  81. itself from the CLI window.
  82.  
  83.  
  84.     2.1 Running APrf from the CLI.
  85.     ------------------------------
  86.  
  87.     From the CLI, APrf is invoked using some arguments to  modify  the
  88. default options. The command line is of the form:
  89.  
  90.     APrf [filename][-c#][-f#][-l#][-n#][-oF][-p#][-r#][-s#][-t#]
  91.          [-x#][-A][-Cseq][-D#][-F{L|C|R}fmt][-H{L|C|R}fmt][-Ifont]
  92.          [-N#][-Oopts][-P{p|e|f}][-Spages][-X]
  93.  
  94.     If you specify the filename argument, the corresponding file  will
  95. be taken as  the  file    to  print.  Here's  a  description  of  the  other
  96. arguments:
  97.  
  98.     -c#    (Columns number)
  99.         Prints file in # columns.
  100.         Default value: # = 1
  101.         Minimal value: # = 1. Maximal value: # = 999.
  102.  
  103.     -f#    (page Format)
  104.         Selects page format. # can be one of:
  105.  
  106.             0 : nothing
  107.             1 : header
  108.             2 : footer
  109.             3 : both header and footer
  110.  
  111.         Default value: # = 1.
  112.         See section 2.6 for more information.
  113.  
  114.     -l#    (Left margin)
  115.         Sets a left margin of #  characters.  Note  that  the
  116.         margins set up in Preferences is ALWAYS used.
  117.         Default value: # = 0
  118.         Minimal value: # = 0. Maximal value: # = 999.
  119.  
  120.     -n#    (line Numbering)
  121.         Numbers lines with # digits numbers.
  122.         Default value: # = 0 (no line numbers).
  123.         Minimal value: # = 0. Maximal value: # = 10.
  124.  
  125.     -oF    (Output)
  126.         Printing will be re-directed to file F.
  127.  
  128.     -p#    (Page length)
  129.         Sets page length to # lines.
  130.         Default value: "Paper length" set up in Preferences.
  131.         Minimal value: # = 5. Maximal value: # = 999.
  132.  
  133.     -r#    (Right margin)
  134.         Sets a right margin of # characters.  Note  that  the
  135.         margins set up in Preferences is ALWAYS used.
  136.         Default value: # = 0
  137.         Minimal value: # = 0. Maximal value: # = 999.
  138.  
  139.     -s#    (column Spaging)
  140.         Columns are separated by # spaces.
  141.         Default value: # = 1
  142.         Minimal value: # = 1. Maximal value: # = 999.
  143.  
  144.     -t#    (Tabulation)
  145.         Sets tabulation stop positions to  #+1,  2#+1,    3#+1,
  146.         etc..
  147.         Default value: # = 8.
  148.         Minimal value: # = 1. Maximal value: # = 999.
  149.  
  150.     -x#    (copies)
  151.         Prints # copies of the file.
  152.         Default value: # = 1
  153.         Minimal value: # = 1. Maximal value: # = 999.
  154.  
  155.     -A    (Arexx mode)
  156.         Sets AREXX mode (see section 3.3 for more information).
  157.  
  158.     -Cseq    (Control sequence)
  159.         Selects the control sequence "seq" (see  section  3.4
  160.         for more information).
  161.  
  162.     -D#    (Date format)
  163.         Sets date format in header. # can be one of:
  164.  
  165.             0 : AmigaDOS format (dd-mmm-yy)
  166.             1 : International format (yy-mm-dd)
  167.             2 : American format (mm-dd-yy)
  168.             3 : European format (dd-mm-yy)
  169.  
  170.         Default value: # = 0.
  171.         See section 2.6 for more information.
  172.  
  173.     -F{L|C|R}fmt (Footer format)
  174.         Specifies page footer format.
  175.         See section 2.6 for more information.
  176.  
  177.     -H{L|C|R}fmt (Header format)
  178.         Specifies page header format.
  179.         See section 2.6 for more information.
  180.  
  181.     -Ifont    (Internal font)
  182.         Select the given font.
  183.         See section 3.4 for more information.
  184.  
  185.     -N#    (page Numbers)
  186.         Sets first page number to #.
  187.         Default value: # = 1.
  188.         Minimal value: # = 1. Maximal value: # = 899.
  189.  
  190.     -Oopts    (Options)
  191.         Allows you to modify several options. opts can be any
  192.         combination of :
  193.  
  194.             l    letter quality
  195.             d    draft quality
  196.             8    8 LPI spacing
  197.             6    6 LPI spacing
  198.             F    fanfold paper
  199.             S    single sheet paper
  200.             t    truncate too long lines
  201.             f    control characters filter
  202.             a    ANSI sequences filter
  203.             k    output buffer size of 1 Kbytes
  204.             n    don't send "Form Feed"
  205.             u    underline header
  206.  
  207.         See the description of "Options" menu, at section 2.5, for
  208.         further informations.
  209.  
  210.     -P{p|e|f} (print Pitch)
  211.         Selects print pitch :
  212.  
  213.             -Pp    for "pica" pitch
  214.             -Pe    for "elite" pitch
  215.             -Pf    for "fine" pitch
  216.  
  217.         Default value : "Pitch" set up in Preferences.
  218.  
  219.     -Spages (Selection)
  220.         Selects the pages to print. pages can be one of :
  221.  
  222.             x      : only page x
  223.             x-y      : from page x to y
  224.             x,y,z,... : pages x,y,z,... (up to 16 pages)
  225.  
  226.         You can also use the two last forms together, as in
  227.         "-S1,3,5-8".
  228.  
  229.         CAUTION: the page numbers that you specify for page
  230.              selection must depend of  the    first  page
  231.              number (see -N option)
  232.  
  233.     -X    (eXpress)
  234.         Sets "eXpress" mode (see  section  3.2  for  further
  235.         information).
  236.  
  237.     If you make an error in your command line, a window will appear on
  238. the Workbench screen, with the message "Bad arguments". Click in the  "OK"
  239. gadget (or press Amiga-V) to make the window disappear, and  correct  your
  240. command line. Then, run APrf once more.
  241.     The "Tools" menu  has  a  command  that  gives  the  command  line
  242. corresponding to the current option settings (see section 2.5 for  further
  243. information).
  244.  
  245.  
  246.     2.2 Running APrf from Workbench.
  247.     --------------------------------
  248.  
  249.     There's three ways to run APrf from  Workbench,  if  you  want  to
  250. specify the files that hare to be printed:
  251.  
  252.      - by double-clicking on a "Project" icon  whose  "Default  tool"
  253.        is APrf
  254.      - by clicking on one or more file icons, holding down the    SHIFT
  255.        key, and double-clicking on APrf icon
  256.      - by clicking on APrf icon (and if required on some file icons),
  257.        holding down the SHIFT key, and double-clicking on a file icon
  258.  
  259.     In any case, the selected  files  are  transmitted  to    APrf.  The
  260. program will display the first filename in the "File to print" gadget (see
  261. section 2.4). The "Next file" command in the "Project" menu allows you  to
  262. skip to the next file (see section 2.5), and the "Default options" command
  263. in the "Tools" menu allows to go back to the first file in the files  list
  264. (see section 2.5).
  265.  
  266.     As when you run APrf from the CLI, you can give some arguments    to
  267. modify default options. To do this, click on a file icon  and  select  the
  268. "Information" item in the "Icons" menu (on Workbench screen).  Then  click
  269. on the "New" gadget in the "TOOL TYPES" field, and add the arguments
  270. according to the following syntax:
  271.  
  272.     APRF=[-c#][-f#][-l#][-n#][-oF][-p#][-r#][-s#][-t#][-x#]
  273.          [-Cseq][-D#][-F{L|C|R}fmt][-H{L|C|R}fmt][-Ifont]
  274.          [-N#][-Oopts][-P{p|e|f}][-Spages]
  275.  
  276.     These options are described in section 2.1. If you run    APrf  from
  277. Workbench without arguments (i.e. if you just click twice on APrf's  icon)
  278. options will be taken from "TOOL TYPES" field of APrf's project icon.
  279.     Please notice that -A (AREXX mode) and -X (eXpress  mode)  options
  280. can't be specified when running APrf from Workbench.
  281.  
  282.  
  283.     2.3 Getting started.
  284.     --------------------
  285.  
  286.     If all goes well, a new screen will  be  opened,  and  you'll  see
  287. several gadgets. Otherwise, a window will appear on Workbench screen  with
  288. a message telling you what a problem occurred. Click in  the  "OK"  gadget
  289. (or press Amiga-V) to make the window disappear, APrf stops and returns  a
  290. value of 10 (ERROR, see "If" command of AmigaDOS).
  291.  
  292.     APrf can return a value of 10 without displaying any  message,    in
  293. only four situations:
  294.  
  295.     a) APrf couldn't open "intuition.library"
  296.     b) APrf couldn't open "graphics.library"
  297.     c) APrf couldn't open the error window
  298.     d) APrf couldn't open the Workbench screen
  299.  
  300.     However, I don't think these things will occur very often.
  301.  
  302.     Now, I will suppose that APrf is running well. The  two  following
  303. sections are going describe the gadgets and menus  of  APrf.  If  you  are
  304. using APrf for the first time I suggest to run the program,  in  order    to
  305. understand these explanations.
  306.  
  307.  
  308.     2.4 Gadgets.
  309.     ------------
  310.  
  311.     This section describes all the gadgets displayed  on  the  screen,
  312. from the left top corner to the right bottom one:
  313.  
  314.     File to print:
  315.  
  316.         This gadget shows the name of the file to print.
  317.         To modify its value just click on it: a file requester  will
  318.         appear. If you click on the CANCEL gadget of this requester,
  319.         or on the OK gadget without giving a file name, the previous
  320.         name won't be modified.
  321.         A '*' character will appear on the right of the  file  name,
  322.         when the file is loaded in memory (see section 4.1).
  323.  
  324.     Output file:
  325.  
  326.         This gadget shows where a file will be printed.
  327.         Default value is "PRT:", but can be changed with  -o  option
  328.         (see section 2.1).
  329.         To modify its value just click on it: a file requester  will
  330.         appear. If you click on the CANCEL gadget of this  requester
  331.         the output file will become "PRT:".
  332.  
  333.     Page selection:
  334.  
  335.         This gadget shows which pages will be printed.
  336.         Default value is "*" (all the pages),  but  can  be  changed
  337.         with -S option (see section 2.1).
  338.         Please refert to section  2.8  to  see  how  to  modify  the
  339.         selection.
  340.  
  341.     The nine next gadgets allow  to  specify  respectively:  the  left
  342. margin size, the right margin size, the tabulation  size,  the    number    of
  343. lines per page, the first page number, the line numbers size,  the  number
  344. of columns, the column spacing, and the number of copies that have  to    be
  345. printed.
  346.     Each gadget shows the current value of its corresponding parameter.
  347. You can click on the value to modify it with the keyboard  (press  Amiga-X
  348. to erase the old value, don't forget to press RETURN to validate  the  new
  349. value). You can also increase the current value  by  clicking  on  the    up
  350. arrow, and decrease it by clicking on the down arrow. If a  value  doesn't
  351. change, you have reached the lower or the higher limit ! As  long  as  you
  352. keep the left mouse button down, the value will be increased or decreased.
  353.  
  354.     Left margin: (see -l option in section 2.1)
  355.         Default value: 0
  356.         Lowest value : 0
  357.         Highest value: 999
  358.  
  359.     Right margin: (see -r option in section 2.1)
  360.         Default value: 0
  361.         Lowest value : 0
  362.         Highest value: 999
  363.  
  364.     Tabulation: (see -t option in section 2.1)
  365.         Default value: 8
  366.         Lowest value : 1
  367.         Highest value: 999
  368.  
  369.     Page length: (see -p option in section 2.1)
  370.         Default value: "Paper length" set up in Preferences
  371.         Lowest value : 5
  372.         Highest value: 999
  373.  
  374.     First page number : (see -N option in section 2.1)
  375.         Default value: 1
  376.         Lowest value : 1
  377.         Highest value: 899
  378.  
  379.         NOTE : page selection will be lost each time you
  380.                will change the first page number.
  381.  
  382.     Line numbers : (see -n option in section 2.1)
  383.         Default value: 0 (no line numbers)
  384.         Lowest value : 0 (no line numbers)
  385.         Highest value: 10
  386.  
  387.     Columns: (see -c option in section 2.1)
  388.         Default value: 1
  389.         Lowest value : 1
  390.         Highest value: 999
  391.  
  392.     Col. Spacing: (see -s option in section 2.1)
  393.         Default value: 1
  394.         Lowest value : 1
  395.         Highest value: 999
  396.  
  397.     Copies : (see -x option in section 2.1)
  398.         Default value : 1
  399.         Lowest value  : 1
  400.         Highest value : 999
  401.  
  402.     The four next gadgets are used to choose a value between  severals
  403. one. Use the arrow-like gadget at the right of the value to change it.
  404.  
  405.     Page format:
  406.  
  407.         This gadget shows the selected page format (see section 2.6).
  408.         By default, the format is "header", but this can  be  changed
  409.         with -f option (see section 2.1).
  410.  
  411.     Date format:
  412.  
  413.         This gadget shows the date format in the header (see  section
  414.         2.6). By default, the format is the AmigaDOS format, but this
  415.         can be changed with -D option (see section 2.1).
  416.  
  417.     Print pitch:
  418.  
  419.         This gadget indicates print pitch.
  420.         Default value is taken from "Pitch" set  up  in  Preferences,
  421.         but can be changed with -P option (see section 2.1).
  422.  
  423.     Font:
  424.  
  425.         This gadget indicates the font to use.
  426.         Usually it's the defaut font, but this can be changed with -I
  427.         option (see section 2.1).
  428.         For more information, see section 3.4.
  429.  
  430.     The next gadgets allows you to personnalize  the  header  and  the
  431. footer.
  432.  
  433.     Header:
  434.  
  435.         This gadget shows the format  of  the  three  parts  of  the
  436.         header : the left part, the  central  part,  and  the  right
  437.         part.
  438.         Default value of each part can be  changed    with  -H  option
  439.         (see section 2.1).
  440.         To modify the value of any part just click on it : a  window
  441.         with a string gadget will appear.  Press  Amiga-X  to  erase
  442.         current value, RETURN to validate, or click  on  the  window
  443.         close gadget to abort.
  444.         For more information, see section 2.6
  445.  
  446.     Footer:
  447.  
  448.         Same as header gadgets, but for the footer.
  449.         Default value of each part can be  changed    with  -F  option
  450.         (see section 2.1).
  451.         For more information, see section 2.6
  452.  
  453.     The two diamond-shaped gadgets on the bottom of the screen  allows
  454. you to start printing (left gadget) or previewing (right  gadget)  without
  455. having to play with the menus.
  456.     You can also click on the main window's close gadget  (upper  left
  457. corner) to quit the program, or on the "zoom" gadget (upper right  corner)
  458. to iconify APrf.
  459.  
  460.  
  461.     2.5 Menus.
  462.     ----------
  463.  
  464.     APrf has three    menus:    "Project",  "Tools"  and  "Options".  Each
  465. command can be selected by mouse or by a keyboard shortcut, but  "Options"
  466. menu items must be  selected  by  mouse.  Here    are  the  options  of  the
  467. Project" menu:
  468.  
  469.     "Next file" command (Amiga-N):
  470.  
  471.         If you have run APrf from Workbench and selected several
  472.         icons, this command allows you to skip to the next  file
  473.         in the list of selected files.
  474.         The "File to print" gadget is updated (see section 2.4),
  475.         and the old file is removed from memory (if it had  been
  476.         loaded, see section 4.1).
  477.  
  478.     "Print" command (Amiga-P):
  479.  
  480.         Start printing.
  481.  
  482.     "AREXX mode" command (Amiga-A):
  483.  
  484.         APrf goes in AREXX mode (see below section 3.3).
  485.         A  requester  will  apear:  click  on  "YES"  (or  press
  486.         Amiga-V) to confirm, or click on "NO" (or press Amiga-B)
  487.         to abort.
  488.  
  489.     "About..." command (Amiga-?):
  490.  
  491.         Displays some informations about APrf.
  492.         To close the window, click inside it or press any key.
  493.  
  494.     "Iconify" command (Amiga-I):
  495.  
  496.         APrf goes sleeping, freeing  at  least    32  Kb    of  CHIP
  497.         memory and some other workspace  (the  current  file  is
  498.         removed from memory if it had been loaded).  The  screen
  499.         is closed and a small  window  (which  title  is  "APrf2
  500.         v1.30") will appear  on  the  top  left  corner  of  the
  501.         Workbench's screen.
  502.         To awake APrf, you must activate this window  and  click
  503.         then on the right mouse button.
  504.         You can quit APrf without having to awake it by clicking
  505.         on the close gadget of the small window.
  506.  
  507.     "Quit" command (Amiga-Q or ESCAPE):
  508.  
  509.         Quit APrf.
  510.         A  requester  will  apear:  click  on  "YES"  (or  press
  511.         Amiga-V) to confirm, or click on "NO" (or press Amiga-B)
  512.         to abort.
  513.  
  514.  
  515.     Here are the commands of the "Tools" menu:
  516.  
  517.     "Default Options" command (Amiga-D):
  518.  
  519.         Restores the default options (first it loads Preferences
  520.         then it scans the command line).
  521.         If you have run APrf from Workbench and selected several
  522.         icons, the first file of the list becomes the file  that
  523.         will be printed.
  524.         This command may be useful, for example, if  you  modify
  525.         the Preferences settings and want APrf to know about it,
  526.         without having to quit the program.
  527.  
  528.     "Load file" command (Amiga-L):
  529.  
  530.         Loads immediately the file to print in    memory.  If  the
  531.         file was already in memory, yet this command  reload  it
  532.         (see section 4.1).
  533.  
  534.     "Unload file" command (Amiga-U):
  535.  
  536.         Removes the file to print from memory.
  537.         (see section 4.1).
  538.  
  539.     "Preview" command (Amiga-V):
  540.  
  541.         Activates the preview function (see section 2.7).
  542.  
  543.     "Command line" command (Amiga-K):
  544.  
  545.         Displays the argument list that  you  have  to    give  in
  546.         order to make the current  options  beeing  the  default
  547.         options.
  548.         To close the window, click inside it or press any key.
  549.  
  550.     "Save config" command (Amiga-S):
  551.  
  552.         Save the current options (except the name of the file to
  553.         print) in a new line of the "S:APrf.Init" file. A window
  554.         appears,  and  you  must  enter  the  name  of    the  new
  555.         configuration. Close the window to cancel the operation.
  556.         See section 3.4 for other informations.
  557.  
  558.     "Doc Info" command (Amiga-X):
  559.  
  560.         Displays the page, line  and  character  counts  of  the
  561.         output file. Please notice that the character count will
  562.         always be an approximation.
  563.         To close the window, click on the "OK" gadget  or  press
  564.         Amiga-V.
  565.  
  566.     Here are the items of the "Options" menu:
  567.  
  568.     "Letter" item:
  569.  
  570.         Selects the printing quality: "letter" or "draft".
  571.         Default value is taken from "Print Quality"  set  up  in
  572.         Preferences, but can be  changed  with    -O  option  (see
  573.         section 2.1).
  574.  
  575.     "8 LPI" item:
  576.  
  577.         Selects line spacing: "8LPI" or "6PLI"
  578.         Default  value    is  taken  from  "Spacing"  set  up   in
  579.         Preferences, but can be  changed  with    -O  option  (see
  580.         section 2.1).
  581.  
  582.     "Fanfold" item:
  583.         Selects paper type: "fanfold" or "single"
  584.         Default  value    is  taken  from  "Pitch"   set   up   in
  585.         Preferences, but can be  changed  with    -O  option  (see
  586.         section 2.1).
  587.  
  588.     "Truncate" item:
  589.  
  590.         If active, too long lines are truncated instead of being
  591.         wrapped on several lines.
  592.         By default, it is not active, but this    can  be  changed
  593.         with -O option (see section 2.1).
  594.  
  595.     "CTRL filter" item:
  596.  
  597.         If active, the control characters (ASCII code lower than
  598.         32 or greated than 126) found in the file to  print  are
  599.         not send to the printer.
  600.         By default, it is not active, but this    can  be  changed
  601.         with -O option (see section 2.1).
  602.  
  603.     "ANSI filter" item:
  604.  
  605.         If active, the ANSI sequences  described  in  section  6
  606.         are not send to the printer.
  607.         By default, it is not active, but this    can  be  changed
  608.         with -O option (see section 2.1).
  609.  
  610.     "Buffer 1Kb" item:
  611.  
  612.         If active, the output buffer size will be 1 Kb    (instead
  613.         of one page)
  614.         By default, it is not active, but this    can  be  changed
  615.         with -O option (see section 2.1).
  616.         See section 4.2 for more information.
  617.  
  618.     "Send FF" item:
  619.  
  620.         If active, a "Form Feed" character is send each time the
  621.         bottom of the page is reached.
  622.         By default, it is active, but this can be  changed  with
  623.         -O option (see section 2.1).
  624.  
  625.     "Und. header" item:
  626.  
  627.         If active, the header will be underlined.
  628.         By default, it is not active, but this    can  be  changed
  629.         with -O option (see section 2.1).
  630.  
  631.  
  632.     2.6 Header and footer.
  633.     ----------------------
  634.  
  635.     APrf can add a header, a footer, or both, on your documents. The
  636. choice can be made when calling APrf (-f option, see section 2.1) or with
  637. the "Page format" gadget (see section 2.4). A header or a footer takes to
  638. line on the page.
  639.  
  640.     When you ask for a header (and/or a footer) format, APrf uses  the
  641. values of the "Header" (and/or "Footer")  gadgets  to  build  this  header
  642. (and/or footer). The left gadget shows what  will  be  on  the  left,  the
  643. central gadget what will be centered, and the right gadget what will be on
  644. the right. Format specifications can include the following sequences :
  645.  
  646.     %a    name of the day (e.g. "Monday")
  647.     %b    name of the month (full, e.g. "September")
  648.     %B    name of the month (short, e.g. "Sep")
  649.     %d    day of the month (01 to 31)
  650.     %D    date as shown by the "Date format" gadget
  651.     %f    basename of the file (e.g. "foo")
  652.     %F    full name of the file (e.g. "RAM:Test/foo")
  653.     %h    hour (00 to 11)
  654.     %H    hour (00 to 23)
  655.     %m    month of the year (01 to 12)
  656.     %M    minutes (00 to 59)
  657.     %n    page number
  658.     %p    period of the day (AM or PM)
  659.     %s    file size in bytes
  660.     %S    seconds (00 to 59)
  661.     %v    program release (e.g. "APrf v4.10")
  662.     %w    day of the week (0 to 6)
  663.     %x    copy number
  664.     %y    year of the century (00 to 99)
  665.     %%    % (not guaranted to work...)
  666.  
  667.     Default value for header is "%f" for the left part, "Page %n"  for
  668. the central part, and "%D" for the right part. Default value for footer is
  669. "Page %n" for the central part, and nothing for the other parts.
  670.     You can also specify your own header (and/or  footer)  format,  by
  671. clicking on the gadget corresponding to the part you want  to  modify,    or
  672. (when starting APrf) with -H (and/or -F)  option  :  "-HLformat"  modifies
  673. left  part  of    the  header,   "-HCformat"  modifies  central  part,   and
  674. "-HRformat" modifies right part.
  675.  
  676.  
  677.     2.7 The preview function.
  678.     -------------------------
  679.  
  680.     This function allows you to see how will look the final aspect    of
  681. a text, depending upon the current option settings. To use it,    first  set
  682. up your printing settings, then choose    the  "Preview"  command  from  the
  683. "Tools" menu. A window will appear in the middle of your screen, and shows
  684. how will look the first selected page (window size is shaped by  the  page
  685. size).
  686.     To look the next page, click inside the window or press RETURN. To
  687. stop, click on the window's close gadget or press ESCAPE.
  688.     Please notice that APrf won't be able to open the  preview  window
  689. if page length value is very high : highest value for page  length  is    93
  690. lines in NTSC mode (122 in PAL mode).
  691.  
  692.  
  693.     2.8 Modifying page selection.
  694.     -----------------------------
  695.  
  696.     To modify page selection, click on the "Selected pages" gadget:  a
  697. window will appear in the midle of the screen, showing    a  grid  with  one
  698. hundred numbers, each number corresponding to a page number. These numbers
  699. are written on a white background if the corresponding page  is  selected,
  700. or on a blue background if not.
  701.     If you click on a number, you will change the  selection  for  the
  702. corresponding page. You can also use the following gadgets:
  703.  
  704.     ALL      select all pages
  705.     INVERT      reverse selection
  706.     NONE      no page selected
  707.     OK      accept new selection (or RETURN)
  708.     UNDO      undo all changes (takes back old selection)
  709.     CANCEL      abort modification (or ESCAPE)
  710.  
  711.     There's also a string gadget, in which you can enter  a  selection
  712. specification. This new selection will be added to the current one. Licits
  713. values for the string are:
  714.  
  715.     *      all the pages
  716.     x      page x only
  717.     x-y      from page x to y
  718.     x,y,z,... pages x,y,z,...
  719.  
  720.     You can also use the two last forms together, e.g. "1,3,5-8".
  721.  
  722.     Don't forget that page selection depends of the first page number,
  723. and that you won't be allowed to enter an empty selection (that  is,  with
  724. no page selected).
  725.  
  726.  
  727. 3. Advanced concepts.
  728. ---------------------
  729.  
  730.     This section deals with  some  powerful  features  of  APrf,  that
  731. allows it to be fully integrated in your working environment.
  732.  
  733.  
  734.     3.1 Using "powerpacker.library".
  735.     --------------------------------
  736.  
  737.     APrf can use "powerpacker.library" according you have installed it
  738. in the "LIBS:" directory of your hard disk or Workbench disk. This  allows
  739. you to print any files compressed with "PowerPacker 2.3b" or  "PowerPacker
  740. Pro 3.0b": the file will be decompressed automatically at loading. If data
  741. file has been encrypted, APrf will ask for a password.
  742.  
  743.  
  744.     3.2 The "eXpress" mode.
  745.     -----------------------
  746.  
  747.     It can happen that you want to print a file quickly, without using
  748. the Intuition interface (if your Preferences are correctly set, it  should
  749. be frequent).
  750.     If you specify -X option when calling APrf, once the command  line
  751. has been parsed, printing starts immediatly. APrf doesn't open any screen,
  752. and stops when printing is done. Error messages are displayed in a special
  753. window, on WorkBench's screen.
  754.  
  755.  
  756.     3.3 The AREXX mode.
  757.     -------------------
  758.  
  759.     If you specify -A option when calling APrf, it will  go  in  AREXX
  760. mode: an AREXX-compatible port (named "APrf_rexx") will be  open  and  the
  761. program will wait for messages on this port. This option  make    also  APrf
  762. go in "eXpress" mode, as if -X option was specified (see section 3.2).
  763.  
  764.     The valid messages are :
  765.  
  766.     quit    : APrf closes the message port and terminates.
  767.     wakeup    : APrf closes the message port and open its screen.
  768.     reset    : APrf loads Preferences and sets all options to their
  769.           default values
  770.     load    : APrf loads the file to print
  771.     print    : APrf starts printing
  772.  
  773.     Any other message will be considered as a command line, and scaned
  774. as described in section 2.1. If any error  occurs,  APrf  will    display  a
  775. message on the WorkBench's screen, and terminates.
  776.     If you send a "load" message and APrf don't know which file is  to
  777. load, your command won't have any effect.
  778.  
  779.     Here is an exemple of AREXX program, which print  the  "S:Startup-
  780. Sequence" file with a left margin of 10 characters, and terminates APrf :
  781.  
  782.     /* Print S:Startup-Sequence */
  783.     address "APrf_rexx"
  784.     "S:Startup-Sequence -l10"
  785.     "print"
  786.     "quit"
  787.  
  788.     Please note the " characters arround commands !
  789.  
  790.     From the Intuition interface you can go in AREXX mode by selecting
  791. the "AREXX mode" command in the "Project" menu (see section 2.5).
  792.  
  793.  
  794.     3.4 The "APrf.Init" file.
  795.     -------------------------
  796.  
  797.     When starting, APrf tries to load  the    "S:APrf.Init"  file.  This
  798. file allows you to define typical configurations and/or fonts. To define a
  799. typical configuration, you add a line of the form:
  800.  
  801.     name:options:sequence
  802.  
  803. where "name" and "options" are strings of characteres ("name" shouldn't be
  804. longer than 8 characters), and "sequence"  is  a  list  of  decimal  codes
  805. separated by spaces. "options" and/or "sequence" strings may be empty.Only
  806. the 8 first configurations will be used. Here are two examples:
  807.  
  808.     my8lpi:-p90 -O8:
  809.     landscap:-p80:27 48 108 72
  810.  
  811.     Each name you gave will appear in a new  "Control"  menu.  If  you
  812. select one of these names, the "options" string will immediatly be  parsed
  813. as a CLI command line. Also, at printing time, the characters whose  ASCII
  814. code is given in the corresponding sequence will be send  to  the  printer
  815. (after the initialisation sequences, but before the text itself). You  can
  816. select several names at the same time.
  817.     When calling APrf from the CLI    or  from  the  WorkBench,  the    -C
  818. option allows you to select a  sequence  at  startup  time.  The  "option"
  819. string will be parsed after the other calling options. If the sequence you
  820. specified in the -C option doesn't exist, the option will be ignored.
  821.  
  822.     The "S:APrf.Init" file can also give you access, from APrf, to the
  823. internal fonts of your printer. To define a font, you add a  line  of  the
  824. form:
  825.  
  826.     fontdef:name:sequence
  827.  
  828. where "name" is the name of the font, and "sequence" the list of codes  to
  829. send to your printer to select the given font. Exemple :
  830.  
  831.     fontdef:Prestige:27 107 2 27 120 49
  832.  
  833. You can enter any number of font. Font definitions should be specified    at
  834. the beginning of the file, before typical configurations  definitions.    To
  835. select a font, use either the -I option (see section  2.1) or  the  "Font"
  836. gadget (see section 2.4).
  837.  
  838.     You can put empty  lines  in  the  "S:APrf.Init"  file.  Any  line
  839. beginning with a semicolon character (";") is supposed to be a comment and
  840. is not interpreted.
  841.     The "S:APrf.Init" file will be loaded again each time  you  select
  842. the "Default options" command in the "Tools" menu. In "eXpress" mode  (see
  843. section 3.2), the file "S:APrf.Init" will be loaded only if required (i.e.
  844. if you specified a -C or a -I option). Take notice that the sequences will
  845. be written with a PRD_RAWWRITE command, so they won't  be  interpreted  by
  846. the printer device.
  847.  
  848.  
  849. 4. Memory management.
  850. ---------------------
  851.  
  852.     This section describes how APrf manages the memory space.
  853.  
  854.  
  855.     4.1 The file to print.
  856.     ----------------------
  857.  
  858.     Before printing or previewing a file, APrf  loads  it  in  memory.
  859. Once the file has been printed or previewed,  it  is  kept  in    memory    in
  860. prevision of another print or preview operation. The  great  advantage    is
  861. that APrf has not to load a file each time you ask for previewing  it,    or
  862. when you ask for printing it after a preview.
  863.  
  864.     A file is removed automatically from memory either if you  iconify
  865. APrf (see section 2.5), or if  you  choose  to  print  another  file  (see
  866. section 2.4), or if you select the "Next file" command from the  "Project"
  867. menu (see section 2.5). It can be removed too  (but  not  always)  if  you
  868. select the "Default options" command from the "Tools" menu.
  869.  
  870.     In addition,  the  "Load  file"  command  from  the  "Tools"  menu
  871. enforces APrf to load a file (this will be reloaded even if it was already
  872. in memory), while the "Unload file" command in the "Tools" menu makes APrf
  873. to unload a file from memory.
  874.  
  875.     Now, to let you know if a file is or isn't loaded in memory,  APrf
  876. displays a "*" character on the right of the file name when this  file  is
  877. actually loaded in memory.
  878.  
  879.     This behaviour can present two inconvenients.
  880.     First of all, a file occupies memory even if  you  don't  need  it
  881. anymore. A solution is to iconify APrf (see section 2.5) or to select  the
  882. "Unload file" command from the "Tools" menu.
  883.     The second inconvenient is that if you modify a file on your disk,
  884. any changes could be ignored, because APrf don't load the file  again.  In
  885. order to avoid this, if APrf sees that the file has been modified, it will
  886. ask you if you want to reload it.
  887.  
  888.  
  889.     4.2 The output buffer.
  890.     ----------------------
  891.  
  892.     APrf uses an output buffer in order to make less "write" commands.
  893. With a 1 Kb buffer, printing to a file is twice faster than with the first
  894. releases of APrf whose buffer contained only one line. Even if printing to
  895. printer doesn't seem to be faster,  the  number  of  "write"  commands  is
  896. divided at least by 5 (at most by 14 or 15). Tests have shown that  system
  897. charge was greatly reduced, and though that  THE  OTHER  TASKS    WERE  LESS
  898. SLOWED DOWN.
  899.  
  900.     By default, APrf uses an output buffer of one  page  (see  section
  901. 2.5, "Buffer" option from the "Options" menu). When you change  your  page
  902. size, the output buffer is automatically re-allocated in order to store  a
  903. whole page. If there's not enough memory to allocate this one page buffer,
  904. APrf will try to allocate a 1 Kbytes buffer (a  message  will  inform  you
  905. about this). If there's still not enough memory, APrf will  stop  with  an
  906. error message "Not enough memory".
  907.  
  908.  
  909.     4.3. Memory requirements.
  910.     -------------------------
  911.  
  912.     When you run APrf, you need a bit more than 100 Kbytes    of  memory
  913. for code, data and Intuition interface. Any operation on the file to print
  914. (printing, previewing, etc...) will  cause  this  file  to  be  load  into
  915. memory, and a working buffer of (PageLength  *  LineLength)  bytes  to  be
  916. allocated. Printing will also require an output buffer of one page, or one
  917. Kbytes.
  918.  
  919.  
  920. 5. Miscellaneous.
  921. -----------------
  922.  
  923.     This section is a bric-a-brac of  some    informations  that  didn't
  924. find a place in previous sections. It deals with  some    importants  points
  925. concerning how APrf works. I strongly advise you to read it once at  least
  926. and to remind to read it again if you think APrf is working oddly.
  927.  
  928.     If "Fanfold" option is not activated, here  is  the  behaviour  of
  929. APrf: before printing a page, the program displays a requester asking  you
  930. to insert a new sheet of paper in your printer. When you're  ready,  click
  931. on "YES" (or press Amiga-V) to print the page. If you  click on  "NO"  (or
  932. press Amiga-B) printing will be aborted.
  933.  
  934.     You can abort printing at any time, by clicking in the    box  where
  935. the current copy and page numbers are displayed. A requester will  appear,
  936. asking you confirmation:  click  on  "YES"  (or  press  Amiga-V)  to  stop
  937. printing and click on "NO" (or press Amiga-B) to resume printing.
  938.     If you abort printing, APrf will immediatly stop to send  data    to
  939. the printer, and wait for the last write request to be finished (this  can
  940. be quite long !).
  941.  
  942.     To make your files have a better  looking,  you  can  include  the
  943. following ANSI sequences:
  944.  
  945.         ESC[0m        Normal character set
  946.         ESC[3m        Italics on
  947.         ESC[23m     Italics off
  948.         ESC[4m        Underline on
  949.         ESC[24m     Underline off
  950.         ESC[1m        Boldface on
  951.         ESC[22m     Boldface off
  952.         ESC[1"z         Draft quality
  953.         ESC[2"z         NLQ quality
  954.  
  955.     All these  sequences  will  be    sent  to  your    printer,  but  the
  956. characters that compose them will neither be retained,    nor  be  displayed
  957. when APrf is in preview mode. Any other sequences will be  not    recognized
  958. and will be considered as part of text to be printed. You can filter these
  959. sequences if you don't want them to be send to the  printer  (see  section
  960. 2.5, "ANSI filter" item in "Options" menu).
  961.     The size of these sequences is limited to 32 characters by  OUTPUT
  962. line (not input line !), i.e.  to  6  or  8  sequences,  which  should  be
  963. sufficient in most case. If there's too much sequences on an output  line,
  964. the error message "Lines too long, printing aborted" will be displayed.
  965.  
  966.