Printer State Question (when it is idle, when it is processing)

Ozgur Gungor ozgur22 at gmail.com
Fri Nov 24 05:51:08 PST 2006


> Ozgur Gungor wrote:
> > Hello all,
> >
> > I wrote a printer administration program as a part of a large software, by using CUPS API. My problem is:
> >
> > Firstly, I am sending a large (lets say 100 pages long) text file to printer using cupsPrintFile().
> >
> > After that, i am polling the printer using IPP_GET_PRINTER_ATTRIBUTES request to get "printer-state".
> >
> > I expect that i get IPP_PRINTER_PROCESSING until all of the 100 pages printed and the job is finished. But instead of that, I only see proccesing for a couple of seconds (probably less), and then the only state I get is IPP_PRINTER_IDLE.
> >
> > I am not sure that if this is a configuration error or a property of CUPS. Can you please help me.
>
> We need more information to answer your question...
>
> What version of CUPS are you using?
>
> What driver are you using?
>
> What printer?
>
> How is the printer connected? (lpstat -v printername)
>
> --
> ______________________________________________________________________
> Michael Sweet, Easy Software Products           mike at easysw dot com
> Internet Printing and Publishing Software        http://www.easysw.com


Thanks for the response,

i am using cups1.2rc3, HP laserjet 4050 jetDirect,

and lpstat -v printername result is:
device for IVQ_PRT: socket://192.168.2.15:9100

Actually i have solved my problem. The problem was; when i used cupsPrintFile(), the file was uploading the printers buffer. During this upload process, i got printer state as processing. When the upload was completed i got IDLE although the file has not completely printed.
What i do for the solution is that, i have disabled the printers buffer (by using the menu of the printer) therefore i get processing until all pages of the file printed.

Now i have two questions:

1-) Can I disable printers buffer using a CUPS IPP request?
2-) I am sending cupsCanel() order while printer is processing a file (i.e. while IPP_PRINTER_PROCESSING). After that, I get printer state as IPP_PRINTER_IDLE and also I am able to see that jobs is canceled. But in fact, the printer does not stops to print file until it is all printed.
How can I order printer to stop printing the currently processing job?

Thanks again.




More information about the cups-devel mailing list