attachment

<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><font face="Lucida Console, monospace"><font
          style="font-size: 12pt" size="3">Looks
          like the example for the <span style="font-variant: normal"><font
              color="#1f2328"><span style="letter-spacing: normal"><span
                  style="font-style: normal"><span
                    style="font-weight: normal">CREATE-JOB,
                    SEND-DOCUMENT code needs to be updated </span></span></span></font></span><span
            style="font-variant: normal"><font color="#1f2328"><span
                style="letter-spacing: normal"><span
                  style="font-style: normal"><span
                    style="font-weight: normal">in
                    the “How to Use the Internet Printing Protocol”
                    document</span></span></span></font></span><span
            style="font-variant: normal"><font color="#1f2328"><span
                style="letter-spacing: normal"><span
                  style="font-style: normal"><span
                    style="font-weight: normal">.
                    Kept getting a 1024 error code</span></span></span></font></span><span
            style="font-variant: normal"><font color="#1f2328"><span
                style="letter-spacing: normal">
              </span></font></span><span style="font-variant: normal"><font
              color="#1f2328"><span style="letter-spacing: normal"><span
                  style="font-style: normal"><span
                    style="font-weight: normal">using
                    cupsDoFileRequest - </span></span></span></font></span>I
          had to use
          the "last-document" boolean to the SEND_DOCUMENT op before
          it finally worked. Appears the <b>last-document</b> boolean
          is required. The
          <b>last-document</b> attribute does not appear as a required
          attribute in
          the Common Operations section of the document in Appendix A
          either.</font></font></p>
    <p>//****code below****</p>
    <p style="orphans: 2; widows: 2; margin-bottom: 0.17in"><span
        style="font-variant: normal"><font color="#1f2328"><font
face="apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji"><font
              style="font-size: 10pt" size="2"><span
                style="letter-spacing: normal"><span
                  style="font-style: normal"><span
                    style="font-weight: normal">request
                    = ippNewRequest(IPP_OP_SEND_DOCUMENT);<br>
                    status =
                    ippGetStatusCode(request);<br>
                    if ((status ==
                    IPP_STATUS_OK)||(status ==
                    IPP_STATUS_OK_BUT_CANCEL_SUBSCRIPTION))<br>
                    {<br>
                    ippAddInteger(request,
                    IPP_TAG_OPERATION, IPP_TAG_INTEGER, "job-id",
                    iJobId);<br>
                    ippAddString(request, IPP_TAG_OPERATION,
                    IPP_TAG_URI,
                    "printer-uri", NULL, szUriTag);<br>
                    ippAddString(request,
                    IPP_TAG_OPERATION, IPP_TAG_NAME,
                    "requesting-user-name",
                    NULL, userName);<br>
                    ippAddString(request, IPP_TAG_OPERATION,
                    IPP_TAG_MIMETYPE, "document-format", NULL,
                    getMimeType(filetoPrint));<br>
                    //must include the 'last-document' op
                    or this will fail..<br>
                  </span></span></span></font></font></font></span><strong><span
          style="font-variant: normal"><font color="#1f2328"><font
face="apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji"><font
                style="font-size: 10pt" size="2"><span
                  style="letter-spacing: normal"><span
                    style="font-style: normal"><b>ippAddBoolean(request,
                      IPP_TAG_OPERATION, "last-document", 1);</b></span></span></font></font></font></span></strong><span
        style="font-variant: normal"><font color="#1f2328"><font
face="apple-system, BlinkMacSystemFont, Segoe UI, Noto Sans, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji"><font
              style="font-size: 10pt" size="2"><span
                style="letter-spacing: normal"><span
                  style="font-style: normal"><span
                    style="font-weight: normal"><br>
                    response
                    = cupsDoFileRequest(http, request, "/ipp/print",
                    filetoPrint);<br>
                    status = ippGetStatusCode(response);</span></span></span></font></font></font></span></p>
    <pre class="western"
style="line-height: 145%; orphans: 2; widows: 2; border: none; padding: 0in"><span
    style="display: inline-block; border: none; padding: 0in"><span
    style="font-variant: normal"><font color="#1f2328"><span
    style="letter-spacing: normal"><span style="background: transparent"><code
    class="western">        </code></span></span></font></span><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">if (response)</code></span></span></span></span></font></font></font></span></span>
<span style="display: inline-block; border: none; padding: 0in"><span
    style="font-variant: normal"><font color="#1f2328"><span
    style="letter-spacing: normal"><span style="background: transparent"><code
    class="western">        </code></span></span></font></span><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">{</code></span></span></span></span></font></font></font></span></span>
<span style="display: inline-block; border: none; padding: 0in"><span
    style="font-variant: normal"><font color="#1f2328"><span
    style="letter-spacing: normal"><span style="background: transparent"><code
    class="western">                </code></span></span></font></span><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">ippDelete(response);</code></span></span></span></span></font></font></font></span></span>
<span style="display: inline-block; border: none; padding: 0in"><span
    style="font-variant: normal"><font color="#1f2328"><span
    style="letter-spacing: normal"><span style="background: transparent"><code
    class="western">        </code></span></span></font></span><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">}</code></span></span></span></span></font></font></font></span></span>
<span style="display: inline-block; border: none; padding: 0in"><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">}</code></span></span></span></span></font></font></font></span></span>

<span style="display: inline-block; border: none; padding: 0in"><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">//**** </code></span></span></span></span></font></font></font></span><span
    style="font-variant: normal"><font color="#1f2328"><font
face="ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace"><font
    style="font-size: 8pt" size="1"><span style="letter-spacing: normal"><span
    style="font-style: normal"><span style="font-weight: normal"><span
    style="background: transparent"><code class="western">end code ****</code></span></span></span></span></font></font></font></span></span></pre>
    <p style="line-height: 100%; margin-bottom: 0in">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!</p>
    <p></p>
  </body>
</html>