Changeset 2381

Show
Ignore:
Timestamp:
07/21/05 14:17:32 (19 years ago)
Author:
jerome
Message:

Doesn't display the list of printers when the CGI script doesn't require an
authentication, because the size of the job doesn't depend on the printer
being used. When there's authentication, the exact cost of a print job
depends on the printer(s) chosen and the user's overcharging factor.
Severity : minor

Location:
pykota/trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/cgi-bin/pykotme.cgi

    r2379 r2381  
    139139                inputfile = self.form["inputfile"].value 
    140140                 
    141         self.body += self.htmlListPrinters(printers or [])             
    142         self.body += "<br />" 
     141        if os.environ.get("REMOTE_USER") is not None :         
     142            self.body += self.htmlListPrinters(printers or [])             
     143            self.body += "<br />" 
    143144        self.body += _("Filename") + " : " 
    144145        self.body += '<input type="file" size="64" name="inputfile" />' 
  • pykota/trunk/docs/pykotme.sgml

    r2233 r2381  
    1616    To get a print quote, you have to launch <command>pykotme</command> 
    1717    from the command line, passing your print job's content in any format 
    18     recognized by PyKota 
    19     <footnote><para>PyKota currently recognizes PostScript (both binary and DSC compliant), 
    20     PCLXL (aka PCL6), PDF, PCL3/4/5, and ESC/P2 
     18    recognized by PyKota  
     19    <footnote><para>PyKota now uses <ulink url="http://www.librelogiciel.com/software/pkpgcounter/action_Presentation">pkpgcounter</ulink> 
     20    which recognizes PostScript (both binary and DSC compliant), 
     21    PCLXL (aka PCL6), PDF, PCL3/4/5, ESC/P2, TIFF, DVI, OpenOffice Writer, and OpenOffice Impress. 
    2122    </para></footnote>, either in the form of one or more file names on the command line, 
    2223    or on its standard input (i.e. in a shell pipe or redirection). 
     
    4344    However without authentication <filename>pykotme.cgi</filename> will only 
    4445    return the print job's size and not its cost, because the cost depends on 
    45     the value of the user's overcharging factor. That's why if you want to 
     46    the value of the user's overcharging factor and the printer being used.  
     47    That's why if you want to  
    4648    obtain the same functionnality with the <acronym>CGI</acronym> script than  
    4749    with the command line tool, you must configure your web server to force 
    4850    users to authenticate whevenver they access to <filename>pykotme.cgi</filename>. 
     51    Then they will be able to choose one or more printers (all by default),  
     52    and also to enter their username, 
     53    and the exact cost of the print job will be computed. 
    4954  </para> 
    5055