The InternetPrintingProtocol (IPP), defined by the Printer Working Group, is intended to replace the old LPD protocol for interacting with network printers. This is only a partial implementation of the client side of the protocol, but it’s sufficient to submit a print job to a device, to query its capabilities, and to examine its queue.
Code by EricMarsden and the file can be download here:
http://purl.org/net/emarsden/home/downloads/ipp.el
or: