LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   CUPS Print Queue Manager for Print Server (http://www.linuxquestions.org/questions/linux-software-2/cups-print-queue-manager-for-print-server-425896/)

Matir 03-17-2006 08:54 PM

CUPS Print Queue Manager for Print Server
 
I've found that what I'm looking for here is very hard to google for, because I'm not sure of a term for it, so even helping to narrow down my keywords would be much appreciated.

I'd like to implement (either from software available, or on my own) some sort of system that will allow me to manage print jobs sent to a print server. I'm setting up this print server for a small conference which will have a computer lab, and I'd like whoever is working there to be able to see the print jobs submitted from Windows client machines and approve each of them. Ideally, I'd be able to get the hostname, filename, and number of pages for each job and provide a "Print" and "Cancel" button. This will reduce our paper and toner usage and waste.

I am a computer science major and the conference is a full 8 months away, so I'm not afraid of implementing something myself if anyone has any ideas on where to begin. The server will be running CUPS for printing, of course. I guess I need to get in right between the printer drivers in CUPS and the printer itself.

JZL240I-U 03-20-2006 02:10 AM

Umm, maybe I misunderstand this. If you use a box with KDE, it already has a built in queue manager with all these features ... or do you want to enable Windows to manage the printserver queue?

Matir 03-20-2006 09:24 PM

Perhaps I just don't see the option in KDE, but I need the queue manager to be able to (by default) hold on to print jobs until they are approved.

JZL240I-U 03-21-2006 01:02 AM

Oh, I see. Can't you set the queue to "hold" the jobs by itself? I seem to remember that there are commands to directly modify the behaviour of queues (doing this from memory, have no system here).

garyamort 11-14-2006 07:26 AM

Quote:

Originally Posted by Matir
I am a computer science major and the conference is a full 8 months away, so I'm not afraid of implementing something myself if anyone has any ideas on where to begin. The server will be running CUPS for printing, of course. I guess I need to get in right between the printer drivers in CUPS and the printer itself.

Not sure how you did, but I ran across your question while researching this option myself for my own use.

What I did is used the GUI tool to add an option for the printer(choose the job-hold-untill option, and after adding it choose indefinite as the time frame)

Than when CUPS added the printer, it placed the following in the /etc/cups/printers.conf file for it:
"Option job-hold-until indefinite"

Now any jobs submitted to cups get held indefinitely.

CUPS has it's own management screen, so you can view the jobs in the queue, cancel them, release them, or move them to another printer.

It does not, however, show the number of pages.

However, I did find that when using it as a Postscript printer, it is possible to use Ghostscripts PS to PDF function to convert it to a PDF. So I'm looking to add a small script that can be called over the web, will grab the job id, find the print spool file, run the conversion and then send the PDF file back to the user.

That way the 'print manager' is able to preview the print jobs before accepting them.

Sorry this is so late and probably of no help to you, but I figured if someone else runs across your post as I did they would be interested.

big_raji 02-09-2007 12:46 PM

Quote:

Originally Posted by garyamort
Not sure how you did, but I ran across your question while researching this option myself for my own use.

However, I did find that when using it as a Postscript printer, it is possible to use Ghostscripts PS to PDF function to convert it to a PDF. So I'm looking to add a small script that can be called over the web, will grab the job id, find the print spool file, run the conversion and then send the PDF file back to the user.

That way the 'print manager' is able to preview the print jobs before accepting them.

I also came across this thread, since I'm looking to do exactly what you described. Thanks for the tip. Did you have any success with your script for PS -> PDF -> Approval?

mohtasham1983 09-18-2008 04:34 PM

It might be a little bit late, but I was looking for the same thing for my specific web application with a billing system.

I did this last year. All you have to do is to add "Option job-hold-until indefinite" to /etc/cups/printer.conf inside your printer configuration file to hold all print jobs it receives by default.

Then install pkpgcounter. Using this program, you can calculated the number of pages for each print job.

The print jobs are located in /var/spool/cups/ in Debian. In my case each print job starts with letter "c" followed by print job ID.


For example, the following command returns the number of pages for the print job with ID=6854.
Code:

pkpgcounter /var/spool/cups/c06854
Then you can simply release your print job by issuing the following command:

Code:

sudo lp -i <printjob> -H resume
If you want to be green, and if your printer supports back to back printing mechanism, you can use the following command to release your print job:

Code:

sudo lp -o sides=two-sided-long-edge -i <printjob> -H resume
I hope it can help someone.

JZL240I-U 09-19-2008 02:01 AM

Thanks for coming back to this old thread with a solution. That's what makes LQ a repository of knowledge.

auburn 01-11-2009 01:55 AM

These are "print release station" functions and I also found this thread very helpful. I'm currently running edubuntu with 15 thin clients. One of my thin clients is a print release monitor/manager which I've created by making it fire up firefox when it boots and setting the default homepage to localhost:631/jobs/. I also use a few firefox addons to force firefox to completely fill the screen with no toolbars and refresh every 3 seconds. I have not tried "Option job-hold-until indefinite" but that's exactly what I'm looking for to convert my monitor into a true "print release station". I am also trying to use the same cups server as a queue for winxp and osx workstations. I *believe* I may be able to install this queue on winxp as a tcp/ip (aka internet) printer and manage windows print jobs with cups too. (Scroll down to windowsXP client machine.) Here is someone who seems to have accomplished all this. Btw, I've also heard that pykota can help with getting page counts.

mohtasham1983 01-11-2009 04:32 AM

I think Pykota uses pkpgcounter, too.


All times are GMT -5. The time now is 09:15 AM.