Extending the Web Interface

Opher Shachar ophers at ladpc.co.il
Thu Dec 14 07:08:34 PST 2006


Hello all,
  Our company is porting it's core applications to Java/Oracle on Linux (RedHat). We found the Web Interface of CUPS to be very useful but, are still missing some key functionalities.

Our application currently prints by producing plain text files and submitting them to CUPS ( using lp ) with appropriate options (cpi, lpi, orientation etc.) selected by the user. Some of those printouts are a result of long running (may be 4 hours or more) jobs.
  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.

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.
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.

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...

Any hints and direction would be greatly appreciated.
Opher Shachar.




More information about the cups mailing list