<div dir="ltr"><div>Hi</div><div><br></div><div>I want to get all the job attributes 
like Pagesize, PaperType, Paper source for the job. I am using the 
following code to get that information.<br></div><div><br></div><div>static const char * const jattrs[] =  /* Job attributes we want */<br>  {<br>    &quot;job-template&quot;,<br>    &quot;job-description&quot;,<br>    &quot;all&quot;<br>  };<br>    httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), &quot;ipp&quot;, NULL,<br>         &quot;localhost&quot;, ippPort(), &quot;/printers/%s&quot;, printer);<br>  /* Getting the resource */<br>  resource = uri + (strlen(uri) - strlen(printer) - 10);<br>  http = http_connect_local();<br>  request = ippNewRequest(IPP_OP_GET_JOB_ATTRIBUTES);<br>  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, &quot;printer-uri&quot;, NULL,uri);<br>  ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, &quot;job-id&quot;,job_id);<br>  ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, &quot;requesting-user-name&quot;, NULL, cupsUser());<br>  ippAddStrings(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, &quot;requested-attributes&quot;, <br>    (int)(sizeof(jattrs) / sizeof(jattrs[0])), NULL, jattrs);<br><br>  response = cupsDoRequest(http, request,resource);<br>  attr = ippFirstAttribute(response);</div><div><br></div><div><br></div><div>The output of the code is :</div><div><div><div>attributes-charset,utf-8</div><div>attributes-natural-language,en-in</div><div>number-of-documents,1</div><div>job-media-progress,0</div><div>job-more-info,<a href="http://localhost/jobs/103" target="_blank">http://localhost/jobs/103</a></div><div>job-printer-up-time,1553796490</div><div>job-printer-uri,ipp://localhost/printers/grp</div><div>job-uri,ipp://localhost/jobs/103</div><div>job-originating-user-name,deepak</div><div>printer-uri,ipp://localhost:631/printers/grp</div><div>job-name,ASL350_Assignment.pdf</div><div>number-up,1</div><div>PageSize,A4</div><div><b>MediaType,Envelope</b></div><div>Collate,false</div><div>job-priority,50</div><div>job-sheets,none,none</div><div>Duplex,None</div><div>document-format-detected,application/pdf</div><div>document-format,application/pdf</div><div>job-uuid,urn:uuid:e5aa7490-eb34-3200-6a64-7e43ca050a39</div><div>cups-browsed,true</div><div>job-originating-host-name,localhost</div><div>date-time-at-completed,no-value</div><div>date-time-at-creation,2019-03-28T18:08:10Z</div><div>date-time-at-processing,2019-03-28T18:08:10Z</div><div>time-at-completed,no-value</div><div>time-at-creation,1553796490</div><div>time-at-processing,1553796490</div><div>job-id,103</div><div>job-state,processing</div><div>job-state-reasons,job-printing</div><div>job-impressions-completed,0</div><div>job-media-sheets-completed,0</div><div>job-k-octets,51</div><div>job-hold-until,no-hold</div><div><br></div><div>1. The media-col attribute is not returned in the request. How I can change the request to get media-col ?</div><div>2. The paper type is given as &quot;MediaType Envelope&quot;, How I can get the media-type from the response ? I tried: <br></div><div>           if ((attr = ippFindAttribute(response, &quot;MediaType&quot;, <br>        IPP_TAG_KEYWORD)) != NULL &amp;&amp; ippGetCount(attr)&gt;0){<br></div><div><br></div><div><br></div><div>             if ((attr = ippFindAttribute(response, &quot;media-type&quot;, <br>        IPP_TAG_KEYWORD)) != NULL &amp;&amp; ippGetCount(attr)&gt;0){</div><div><br></div><div><div><img src="cid:ii_ju3t84c50" alt="Screenshot from 2019-03-28 23-15-00.png" width="493" height="277"><br></div></div></div></div></div>