LinuxCommandLibrary

ippfind

Discover Internet Printing Protocol (IPP) printers

TLDR

List IPP printers registered on the network with their status

$ ippfind [[-l|--ls]]
copy

Send a specific PostScript document to every PostScript printer on the network
$ ippfind --txt-pdl application/postscript [[-x|--exec]] ipptool -f [path/to/document.ps] '{}' print-job.test \;
copy

Send a PostScript test document to every PostScript printer on the network
$ ippfind --txt-pdl application/postscript [[-x|--exec]] ipptool -f onepage-letter.ps '{}' print-job.test \;
copy

Send a PostScript test document to every PostScript printer on the network, whose name matches a regex
$ ippfind --txt-pdl application/postscript [[-h|--host]] [regex] [[-x|--exec]] ipptool -f onepage-letter.ps '{}' print-job.test \;
copy

SYNOPSIS

ippfind [-1] [-c path] [-d number] [-e] [-h] [-i address] [-l] [-m mimetype] [-n name] [-o option=value] [-p port] [-t seconds] [-u scheme] [-v] [service name|type]

PARAMETERS

-1
    Stop after finding the first match

-c path
    Add configuration directory

-d number
    Set debug level (0-16)

-e
    Require encryption (ipps only)

-h
    Show usage help

-i address
    Listen on specific interface/IP

-l
    List all service attributes

-m mimetype
    Match printers supporting this MIME type

-n name
    Match exact service name

-o option=value
    Set IPP request option

-p port
    Use specific port number

-t seconds
    Set discovery timeout

-u scheme
    URI scheme: ipp, ipps, or all

-v
    Be verbose

DESCRIPTION

The ippfind command is a utility from the CUPS printing system designed to discover printers and print servers supporting the Internet Printing Protocol (IPP). It leverages multicast DNS (mDNS) services like Avahi or Bonjour to locate devices advertising IPP services on the local network.

ippfind queries for services using the '_ipp._tcp' service type by default, supporting schemes like ipp://, ipps:// (encrypted), and http://. It outputs discovered printers in a format suitable for piping to other tools like ipptool or for scripting printer setup. This makes it invaluable for dynamic printer discovery in environments without static configurations.

Key features include filtering by MIME types supported by printers, service names, URI schemes, and timeouts for reliable operation. Debug modes aid troubleshooting, and options allow customization of queries, such as specifying network interfaces or ports. Primarily used in Linux/Unix printing workflows, it integrates seamlessly with CUPS drivers and system-config-printer.

Usage is straightforward for automated setups, enhancing zero-configuration printing in offices or homes with multiple printers.

CAVEATS

Requires mDNS responder like Avahi; may miss printers not advertising via Bonjour/mDNS. IPv6 support varies by network.

EXAMPLE USAGE

ippfind -t 5 # Discover printers with 5s timeout
ippfind -m image/png _ipp._tcp # PNG-capable printers

OUTPUT FORMAT

Emits lines like printer-uri-supported=https://example.com/ipp/print for parsing in scripts.

HISTORY

Introduced in CUPS 2.3 (2017) by OpenPrinting project to replace older discovery tools, enhancing IPP Everywhere support.

SEE ALSO

avahi-browse(1), ipptool(1), cups-browsed(8), dnssd(1)

Copied to clipboard