On Mar 3, 2010, at 8:57 AM, Albrecht Schlosser wrote:
> Michael Sweet wrote:
>> On Mar 3, 2010, at 2:23 AM, MacArthur, Ian (SELEX GALILEO, UK) wrote:
>>>> I would more like to have an API to access defined printers etc., but
>>>> that's a dream, isn't it? I *really* don't like
>>>> interpretation of other
>>>> programs' output.
>>> CUPS can maybe do this for us?
>>
>>
>> Yup, and CUPS is available on just about every OS and Linux distribution
>> around...
>
> Thanks. Is there a short recipe how to do that, or where to look for it?
Sure, here you go:
http://www.cups.org/documentation.php/api-cups.html
You'll use the cupsGetDests function to get the list of printers, cupsFreeDests
to free that list, and cupsPrintFile to print something (or cupsCreateJob,
cupsStartDocument, cupsWriteRequestData, and cupsFinishDocument if you want to
stream - that's available in CUPS 1.4 and later...)
My printing sample code uses the CUPS API as well:
http://www.easysw.com/~mike/uiexperiments.html
________________________________________
Michael Sweet, Easy Software Products
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev