Extending the Web Interface

Opher Shachar ophers at ladpc.co.il
Thu Dec 14 08:52:57 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

Say no-more, I'll copy and paste in just a few moments :)...

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

So if I have an executable file like so

    #!/bin/sh
    java -cp <whatever> MyJavaCGI

It should do the trick, right?

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

... And do the Java classes under scripting/java have a method to return this - the server file path of a job?
Is it at all available through IPP and if so where can I read about this?
If neither is it safe to construct the file path as: $CUPS_REQUESTROOT/dxxxxx-001 ?

Thanks,
Opher Shachar.




More information about the cups mailing list