Answering 10 years later because this was still one of the first search results I found, and it wasn't quite enough to get me to a working config.
First, the ServerStaticSetup page you previously linked now (if it didn't before) has a section at the bottom with a subtitle "How to set up Wide-Area AirPrint" which covers the basics pretty well.
Second, the link in @Kurt Pfeifle's response to the AirPrint / Bonjour Printing standard on apple.com have broken, but this one works as of now: https://developer.apple.com/bonjour/printing-specification/bonjourprinting-1.2.1.pdf
It seems you need at minimum the following:
- the "browse" PTR record for your domain
- your DNS client configured to search in that domain
- -OR- a reverse-lookup record for lb._dns-sd._udp, in the "domain" of your in-addr.arpa entry
- e.g. if your device's IP is 1.2.3.4, you need a record like
lb._dns-sd._udp.4.3.2.1.in-addr.arpa. PTR yourdomain.tld
- an LPR /
_printer
PTR record and corresponding SRV record
- the SRV record can (and likely should) point to port 0
- a PDL /
_pdl-datastream
PTR and corresponding SRV record
- a PDL TXT record
- an IPP /
_ipp
PTR and corresponding SRV record
- an IPP TXT record
- an IPP.URF /
_universal._sub._ipp
PTR record (pointing at the IPP SRV/TXT domain name)
I reaped the contents needed for the TXT records from mDNS broadcasts coming from the printer, using a machine on the same local wifi network.
- On Linux (with avahi installed) you can use
sudo killall -USR1 avahi-daemon
to dump all records it knows about in zone file format to syslog.
- It's kind of annoying to extract that from syslog, so I used
avahi-browse -d local -a -r -t
to get the same data formatted slightly differently.
- On Mac and Windows (with Bonjour installed) you can use the
dns-sd -Z <name>
command to dump individual records in zone file format.
I'm using DNSMasq, with an HP 8020 series MFP, and this configuration is currently working from the DNS server side:
ptr-record=b._dns-sd._udp.domain.tld,domain.tld
ptr-record=lb._dns-sd._udp.domain.tld,domain.tld
address=/basement-printer.domain.tld/,1.2.3.4
# LPR *must* be advertised, but setting port to 0 shows it's not supported
ptr-record=_printer._tcp.domain.tld,basement-printer._printer._tcp.domain.tld
srv-host=basement-printer._printer._tcp.domain.tld,basement-printer.domain.tld,0
# IPP on port 631
ptr-record=_ipp._tcp.domain.tld,basement-printer._ipp._tcp.domain.tld
# must also advertise URF / _universal for AirPrint to auto-find us
ptr-record=_universal._sub._ipp._tcp.domain.tld,basement-printer._ipp._tcp.domain.tld
srv-host=basement-printer._ipp._tcp.domain.tld,basement-printer.domain.tld,631
txt-record=basement-printer._ipp._tcp.domain.tld,"Fax=T","rfo=ipp/faxout","mopria-certified=2.0","Scan=T","kind=document,envelope,photo,postcard","URF=CP1,MT1-2-8-9-10-11,PQ3-4-5,RS300-600,SRGB24,OB9,OFU0,W8-16,DEVW8-16,DEVRGB24-48,ADOBERGB24-48,DM3,IS1,V1.4,FN3","PaperMax=legal-A4","pdl=application/vnd.hp-PCL,image/jpeg,image/urf,image/pwg-raster,application/PCLm","Duplex=T","Color=T","usb_MDL=OfficeJet Pro 8020 series","usb_MFG=HP","ty=HP OfficeJet Pro 8020 series","product=(HP OfficeJet Pro 8020 series)","UUID=bd06fe8e-e45f-5e04-3ca1-150938ffc67b","rp=ipp/print","TLS=1.2","qtotal=1","priority=30","note=","adminurl=http://HP3024A9686036-783.local./#hId-pgAirPrint","txtvers=1"
# PDL on port 9100
ptr-record=_pdl-datastream._tcp.domain.tld,basement-printer._pdl-datastream._tcp.domain.tld
srv-host=basement-printer._pdl-datastream._tcp.domain.tld,basement-printer.domain.tld,9100
txt-record=basement-printer._pdl-datastream._tcp.domain.tld,"pdl=application/vnd.hp-PCL,image/jpeg,image/urf,image/pwg-raster,application/PCLm","usb_MDL=OfficeJet Pro 8020 series","usb_MFG=HP","mac=DE:AD:BE:EF:DE:AD","UUID=bd06fe8e-e45f-5e04-3ca1-150938ffc67b","priority=40","rp=","txtvers=1"
Finally, because I think others may be doing the same thing-- to configure the DNS search domain for a WireGuard iOS client, you must add it to the "DNS Server" field after a comma... e.g. 1.2.3.4,domain.tld
.
<code>
tags would also work.