Cancelling jobs more quickly (devel question)

Asked by Tim Waugh


I have proposed a CUPS side-channel command upstream that would discard pending output. This could be used as part of the cleanup process when a job is cancelled:

If this feature were to be added, would hpcups use it? It would allow for much faster job cancellations and less ink wastage.


Question information

English Edit question
HPLIP Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Sanjay Kumar (sanjay-kumar14) said :

Hello Tim,

Thanks for the proposal. There are two cases for this.

1) For Non Postscript/Pdf printers (like pcl3gui, pcl3gui2), hpcups processes RGB data (received from ghostscript) line by line and then pass it to hp backend. If the job gets canceled in the between then hpcups sends job cancel sequence ("\x1B%-12345X" ) to the hp backend and then do the cleanup. So I don't think CUPS side-channel command is really needed by hpcups.

2) However for Postscript/Pdf printers hpcups is not at all involved. Cups generated postscript/pdf data is directly sent to hp backend. In this case CUPS side-channel command can be used to cancel the job more quickly.


Revision history for this message
Tim Waugh (twaugh) said :

I think it's especially relevant for case 1. There will be data still buffered:

a) by the hp backend and not yet sent to the printer, as well as

b) in the pipe between hpcups and the hp backend, i.e. sent by hpcups but not yet read by hp (this buffer size is 64kb on Linux)

all of which is ahead of the job cancel sequence. As the job cancel sequence can be sent at any time, my idea with the DISCARD command was to clear all that data out of the way and immediately send the job cancel sequence.

Can you help with this problem?

Provide an answer of your own, or ask Tim Waugh for more information if necessary.

To post a message you must log in.