[cups] Send print jobs from web application as http request

Michael Sweet msweet at apple.com
Wed Jun 24 04:02:59 PDT 2015


Rahul,

First, start by reading RFCs 2910 and 2911 which are the basis of IPP:

    http://tools.ietf.org/html/rfc2910
    http://tools.ietf.org/html/rfc2911

You'll need to encode/decode the application/ipp messages used in the HTTP POST as described in RFC 2910. The Print-Job operation and required attributes are described in RFC 2911.

As for the request *URI*, for CUPS that will be of the form:

    ipp://hostname:port/printers/queuename

(Note that the documentation on the SCO web site is obsolete, as is the version of CUPS)


> On Jun 24, 2015, at 2:24 AM, Rahul Bhooteshwar <rahul.bhooteshwar at hotwaxsystems.com> wrote:
> 
> Hey Michael,
> Thanks for your quick reply. Yes the same origin restriction is a problem,
> but still I would like to try the *"http request way ", * as in the
> scenario I am working in,  *"same origin restriction" *will not be a
> problem. As  I  am new to CUPS I would like to know the exact way of
> preparing http request for the same.
> 
> Anyone please help in preparing http request for the same. I can  see  the
> details about various operation supported by CUPS here
> <http://osr600doc.sco.com/en/PR_cups/ipp.html#1>, but little bit confused
> about making the request URL. An  example in this context will be a great
> help.
> 
> Thanks and Regards,
> Rahul Bhooteshwar
> Enterprise Software Engineer
> 
> 
> On Tue, Jun 23, 2015 at 5:43 PM, Michael Sweet <msweet at apple.com> wrote:
> 
>> Rahul,
>> 
>> While it is technically possible to do IPP operations using
>> XMLHTTPRequest, the same origin restriction makes such a mechanism less
>> useful.
>> 
>> The usual strategy is to have the web service supporting your application
>> handle job submission, or have the browser itself print the content (if it
>> is simple enough to work within the limitations of today's browsers...)
>> 
>> 
>>> On Jun 23, 2015, at 7:51 AM, Rahul Bhooteshwar <
>> rahul.bhooteshwar at hotwaxsystems.com> wrote:
>>> 
>>> Is there any way to send print jobs or query on cups server from web
>>> applications using http request??
>>> And if it is not possible then is there any chance to do the same using
>>> Node.js?
>>> 
>>> Thanks and Regards,
>>> Rahul Bhooteshwar
>>> _______________________________________________
>>> cups mailing list
>>> cups at cups.org
>>> https://www.cups.org/mailman/listinfo/cups
>> 
>> _________________________________________________________
>> Michael Sweet, Senior Printing System Engineer, PWG Chair
>> 
>> _______________________________________________
>> cups mailing list
>> cups at cups.org
>> https://www.cups.org/mailman/listinfo/cups
>> 
> _______________________________________________
> cups mailing list
> cups at cups.org
> https://www.cups.org/mailman/listinfo/cups

_________________________________________________________
Michael Sweet, Senior Printing System Engineer, PWG Chair




More information about the cups mailing list