Skip to contentSkip to conversation

Canceling jobs in Printer Applications

Printing-architecture Till Kamppeter 2 participants 3 messages Jul 28, 2020 – Jul 29, 2020

lore
Share & tools
lore
#0 lore raw

Hi,

what does exactly happen if a job gets cancelled inside a PAPPL-based Printer Application? For example if a user or admin cancels a running job in the web interface, or if a destination device disappears in the middle of the job?

How will filter processes get stopped, for example in the middle of a 200-page job or in the middle of an A0-sized photo?

I do not see any JobCanceled variable which gets set when the job is cancelled and which the filters check in loops or at every page. The filters in cups-filters have such facility whereas the filters in the PCL sample Printer Application do not have this.

Till

#1 lore raw

Till,

Quoted 9 lines · Till Kamppeter

Hi,

what does exactly happen if a job gets cancelled inside a PAPPL-based Printer Application? For example if a user or admin cancels a running job in the web interface, or if a destination device disappears in the middle of the job?

How will filter processes get stopped, for example in the middle of a 200-page job or in the middle of an A0-sized photo?

I do not see any JobCanceled variable which gets set when the job is cancelled and which the filters check in loops or at every page. The filters in cups-filters have such facility whereas the filters in the PCL sample Printer Application do not have this.

So it is up to the PAPPL filter functions to check the papplJobIsCanceled value and clean up accordingly. In the case of the JPEG and PNG filters, we'll stop mid-page as needed courtesy of the papplJobFilterImage function, which they both call to handle the actual conversion of the source image to the destination color space...

Similarly, the PWG/Apple raster processing path will cancel mid-page.

________________________
Michael Sweet

#2 lore raw
Quoted 5 lines · Michael Sweet

So it is up to the PAPPL filter functions to check the papplJobIsCanceled value and clean up accordingly. In the case of the JPEG and PNG filters, we'll stop mid-page as needed courtesy of the papplJobFilterImage function, which they both call to handle the actual conversion of the source image to the destination color space...

Similarly, the PWG/Apple raster processing path will cancel mid-page.

Thank you very much, I will take this into account in my filter function design.

Till