Documentation for "How to use the Internet Printing Protocol"

John Madden via ipp <[email protected]>
Newsgroups gmane.ietf.ipp
Message-ID <[email protected]>
Looks like the example for the CREATE-JOB, SEND-DOCUMENT code needs to 
be updated in the “How to Use the Internet Printing Protocol” document. 
Kept getting a 1024 error codeusing cupsDoFileRequest - I had to use the 
"last-document" boolean to the SEND_DOCUMENT op before it finally 
worked. Appears the *last-document* boolean is required. The 
*last-document* attribute does not appear as a required attribute in the 
Common Operations section of the document in Appendix A either.

//****code below****

request = ippNewRequest(IPP_OP_SEND_DOCUMENT);
status = ippGetStatusCode(request);
if ((status == IPP_STATUS_OK)||(status == 
IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION))
{
ippAddInteger(request, IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id", 
iJobId);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri", 
NULL, szUriTag);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_NAME, 
"requesting-user-name", NULL, userName);
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE, 
"document-format", NULL, getMimeType(filetoPrint));
//must include the 'last-document' op or this will fail..
**ippAddBoolean(request, IPP_TAG_OPERATION, "last-document", 1);**
response = cupsDoFileRequest(http, request, "/ipp/print", filetoPrint);
status = ippGetStatusCode(response);

|||if (response)|
|||{|
|||ippDelete(response);|
|||}|
|}|

|//**** ||end code ****|

Also, could you add a code example for the Cancel-Job (with a job ID)? I 
am following the guidelines for required attributes (Appendix A) but get 
a 1024 for this op as well. Thanks for the great work!

_______________________________________________
ipp mailing list
[email protected]
https://www.pwg.org/mailman/listinfo/ipp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.