Extending the Web Interface

Michael Sweet mike at easysw.com
Thu Dec 14 07:44:24 PST 2006


Opher Shachar wrote:
> ...
> 1. The user may have selected the wrong printer/options when
> submitting the job. So, we need an interface through which the user
> can change the print options (presumably accessible after the
> move-job page).
> 
> 2. The former interface could be made available also when reprinting
> a job.
> 
> 3. If the job is long (sometimes 100's of pages) the user may want to
> view the file to decide which page ranges to print. So, we need a way
> to access the scheduler's copy of the text file and send it as an
> HTML page.

These are all great things to add as feature requests, too:

     http://www.cups.org/str.php

> We have proficient Java and Perl programmers (no proficient C
> programmers). The documentation states that CUPS support CGI programs
> in those languages. I created an /etc/cups/cgi.types as directed but,
> placing a simple Java class (Hello, World) in /usr/share/cups/doc
> resulted in IE6 asking us to download the file.

I'd guess that the Java and Perl interpreters were not present or
locatable when CUPS was compiled/packaged, which will effectively
disable automatic support for those languages.  I think there is a
pending RFE for supporting generic mapping of MIME types to helper
programs so you aren't stuck with the compiled-in defaults.

> When placing a Perl file with a pl extension nothing happened and the
> page eventually timed-out. Renaming the Perl file to a cgi extension
> did have it run.

Right, you can do the same trick with PHP, just not with Java... :(

> Also, how do we get access to Job properties (ex. the file path in
> /var/spool/cups), know who the authenticated user is and so on...

REMOTE_USER will contain the name of the authenticated user.  We
recommend using IPP requests to manipulate the jobs.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com




More information about the cups mailing list