Add Network Printer through libcups API

Azuri azuri.shah at fmr.com
Tue Aug 30 13:46:37 PDT 2011


I did look at lpadmin.c file both its not working . But I am totally confusd.
I did look more into add_printer_to_class method but its not working. All I want is when user enters socket://123.45.45.67 to UI, my code should go ahead and add the printer tot he mac. I have spent hello lot of time trying to figure this out using API's but no success at all so far. Your help will be appreciated.

Russell,
>
> Just download the CUPS source and look at the lpadmin tool.
>
> -Chad
>
> On 8/30/11 4:30 PM, "Azuri" <azuri.shah at fmr.com> thusly spake:
>
> >> Russell Stewart wrote:
> >>> Michael Sweet wrote:
> >>>
> >>>> You need to create an IPP request and send it using cupsDoFileRequest
> >>>> (assuming you are using a PPD file or interface script for the queue)
> >>>
> >>> OK, I see. So I assume that ippNewRequest() is the method to call for
> >>> creating the IPP request, right?
> >>
> >> Yes.  See the "CUPS Implementation of IPP" document for documentation
> >> on the attributes and operations:
> >>
> >>      http://www.cups.org/documentation.php/spec-ipp.html
> >>
> >> --
> >> ______________________________________________________________________
> >> Michael Sweet, Easy Software Products           mike at easysw dot com
> >
> >
> > Can you please provice code on how u did it? I am trying to do the same time
> > but have no success so far. How can I use API's to add printer to my mac. I am
> > developing a Coca app which provides GUI and takes user input to add printer
> > using cups. Please let me know
> > _______________________________________________
> > cups-dev mailing list
> > cups-dev at easysw.com
> > http://lists.easysw.com/mailman/listinfo/cups-dev
>
> Chad Hulbert
> Software Engineer
> Xerox Corporation
> 800 Phillips Rd
> Webster, NY 14580
>
> p 585.427.3295  (8*707.3295)
>





More information about the cups-devel mailing list