Show
Ignore:
Timestamp:
04/24/03 23:09:47 (21 years ago)
Author:
jalet
Message:

Documentation slightly improved.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/docs/filterpykota.sgml

    r865 r959  
    88  <para> 
    99    To account for pages or eventually ink usage, you must plug your accounting 
    10     system into <application>CUPS</application>. One way to do this without having 
    11     to modify <application>CUPS</application> itself, is by using a <firstterm>filter</firstterm>. 
     10    system somewhere into the printing system you use, be it either <application>CUPS</application> 
     11    or <application>LPRng</application>. One way to do this without having 
     12    to modify the printing system itself, is by using a <firstterm>filter</firstterm>. 
    1213  </para> 
    1314   
     
    1819    PostScript data as its input, and, as its name implies, outputs PostScript data too, but after having 
    1920    eventually rearranged the pages to fit several pages on a single sheet of paper, or other manipulations 
    20     like that. 
     21    like that.  
    2122  </para> 
    2223   
     
    2829   
    2930  <para> 
     31    <application>LPRng</application> can also use filters, one often used in combination with 
     32    <application>LPRng</application> is <application>magicfilter</application> which can convert  
     33    different input formats to native printers languages like PostScript or ESC/P2. 
     34  </para>   
     35   
     36  <para> 
    3037    So to do its own accounting, <application>PyKota</application> has its own filter, named <application>pykota</application>, 
    31     which you have to plug into the different set of filters used by <application>CUPS</application>. The procedure to  
     38    which you have to plug into the different set of filters used by your printing system of choice. The procedure to  
    3239    install the <application>pykota</application> filter is described in the  
    3340    <xref linkend="installation" endterm="installation"> chapter. 
     
    3542   
    3643  <para> 
    37     Currently the <application>pykota</application> filter is used at the very last stage of the print mechanism, 
     44    Currently with a <application>CUPS</application> backend, the <application>pykota</application> filter is used at the very last stage of the print mechanism, 
    3845    just before the final data is sent to the printer, but it may eventually be used earlier with some 
    3946    modifications to <application>CUPS</application>'s filtering configuration. This is not tested yet, but this 
    4047    may be the solution to use <application>PyKota</application> with printers which really needs to have 
    41     a <literal>*cupsFilter</literal> line in their <acronym>PPD</acronym> file, i.e. non-postscript printers. 
     48    a specific filter like <application>magicfilter</applicaton> or <application>cupsomatic</application>,  
     49    i.e. non-postscript printers. This is a limitation in <application>CUPS</application> which doesn't really 
     50    allow to specify multiple print filters for different purposes. This problem will be solved in <application>CUPS</application> 
     51    version 1.2 and higher. 
    4252  </para> 
    4353   
    4454  <para> 
    45     The <application>pykota</application> filter really is the only thing which depends on <application>CUPS</application>, 
    46     so it is probable that a next version of <application>PyKota</application> will support other printing environments. 
     55    When used with an <application>LPRng</application> backend, the accounting filter is not defined the same way  
     56    input filters are, so the problem described above doesn't exist, and <application>PyKota</application> 
     57    may work with non-postscript printers, provided they can report their page counter and you know how to do 
     58    this. 
     59  </para> 
     60   
     61  <para> 
     62    When you submit a print job, <application>pykota</application> is automatically launched by your printing system, 
     63    so it has to detect which system you are using (<application>CUPS</application> or <application>LPRng</application>) 
     64    and behave like if it was specifically designed for your printing system. Fortunately there's not a lot 
     65    of differences, the more important one is the exit codes used to tell the printing environment if a job 
     66    has to be accepted or rejected.  
     67  </para> 
     68   
     69  <para> 
     70    <application>pykota</application> then asks the printer for its internal page counter, read from the Quota DataBase the internal 
     71    page counter for this printer when the previous job was launched, computes the difference, and report it as the  
     72    previous job's size in the Quota DataBase. It then updates the last user's print quota and account balance, and 
     73    warn him if he is over quota or his account balance below 0. Finally it checks if the user who launched the  
     74    current job is below or above his print quota, and either allow or deny the job's datas to pass to the underlying  
     75    layer (the printer itself). 
     76  </para> 
     77   
     78  <para> 
     79    If a problem occurs, it is logged either to the filter's standard output or to the system logger, depending on 
     80    your preferences in <application>PyKota</application>'s configuration file. Also if a print quota is reached 
     81    you may choose if the administrator, the user, both or noone will receive an email message explaining 
     82    the situation and proposing a solution. 
    4783  </para> 
    4884   
     
    5288 
    5389$Log$ 
     90Revision 1.3  2003/04/24 21:09:47  jalet 
     91Documentation slightly improved. 
     92 
    5493Revision 1.2  2003/03/25 09:32:06  jalet 
    5594Improved documentation.