0

If I send a pdf as raw to a printer through lp, the job is sometimes (if the printer was in standby) not printed and its status is "deleted" in the CUPs WebGUI. If I check the content of the correspondending /var/spool/cups/c123456 job file, it contains the string "job-canceled-by-user".

Now I found the option job-cancel-after=0, which I think could be the reason for this problem:

lpoptions -d p01
copies=1 device-uri=socket://prt01.example.com:9100 finishings=3 job-cancel-after=0 job-hold-until=no-hold job-priority=50 job-sheets=none,none marker-change-time=1634718006 marker-colors=#000000,none,#00FFFF,#FF00FF,#FFFF00 marker-levels=80,0,20,20,90 marker-names='Toner\ Schwarz,Resttoner,Toner\ Cyan,Toner\ Magenta,Toner\ Gelb' marker-types=toner,waste-toner,toner,toner,toner number-up=1 printer-commands=AutoConfigure,Clean,PrintSelfTestPage printer-info='PRINTERMODEL' printer-is-accepting-jobs=true printer-is-shared=true printer-location=Office printer-make-and-model='PRINTERMODEL' printer-state=3 printer-state-change-time=1634718006 printer-state-reasons=none printer-type=8564988 printer-uri-supported=ipp://localhost/printers/p01

I tried to overwrite it as follows, but it returns nothing and the value is not changed:

lpadmin -d p01 -o job-cancel-after=30

EDIT1:

Doesn't work, too:

lpadmin -d p01 -o job-cancel-after-default=30

EDIT2:

I found the "job attribute" in the IPP documentation and I'm able to read the value as follows:

ipptool -t -v ipp://example.local:631/printers/p01 get-printer-attributes.test | grep cancel
        job-cancel-after-default (integer) = 0
        job-cancel-after-supported (rangeOfInteger) = 0-2147483647
        which-jobs-supported (1setOf keyword) = completed,not-completed,aborted,all,canceled,pending,pending-held,processing,processing-stopped

EDIT3:

Is it maybe possible to add this attribute to a print job through lp as follows?

lp -d p01 -o job-cancel-after=30 -o raw "$pdf"

I tried it, but finally I don't know, how to verify that it works.

mgutt
  • 459
  • 6
  • 22

0 Answers0