How to get notification from printer when physical page/job is complete

▼魔方 西西 提交于 2019-12-04 12:39:32

In the end it all depends on the printers firmware. IPP specifies the attribute job-impressions-completed as optional. That means if the printer can't tell which page has been printed, you won't be able to read it - no matter whether your programming is correct or not.

Manufacturers usually claim to support IPP but don't document very well the optional parts they might have implemented (or not).

Before doing any programming I suggest to read all available job-attrbutes using the ipptool available from CUPS:

#!/usr/bin/env ipptool -tv -d job=482 ipp://192.168.2.113/ipp
{
OPERATION Get-Job-Attributes
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR uri printer-uri $uri
ATTR integer job-id $job
}

job-state is a mandatory attribute and should reach a final state after some time: completed, aborted or canceled. This might be good enough, if you can get the number of job-pages somewhere else :-)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!