Making an iPad print to a CUPS queue

Apple’s iPads (really, any recent iOS device - phones, iPods, etc.) use their
“Airprint™” system for discovering and using printers. If you have
something plugged into a Mac (or AirPort), and shared appropriately, this
is all automatic. My printers are all handled by a CUPS server, though, which
isn’t detected by default. Thankfully, this is amazingly easy to set up if
you install Avahi.

Set up Avahi to advertise your printer’s CUPS queue. Basically, you just need
to write an XML description of the service advertisement; mine looks like this:


    <name replace-wildcards="yes">HP Color LaserJet CP2025dn on server</name>

    <txt-record>MDL=Color LaserJet CP2025dn</txt-record>
    <txt-record>product=(HP Color LaserJet CP2025dn)</txt-record>


A couple important points:

  • You must advertise IPP (since that’s CUPS’ native language, this should be obvious).

  • The _universal subtype is required for AirPrint (though OSX will find the printer without this).

  • Printer capabilities are indicated by <txt-record> tags.

  • The pdl record lists all data types the printer (or in this case, CUPS) can natively handle.

  • The URF record is required. It can be equal to “none“, but if this record is missing AirPrint won’t recognize the printer.

  • The “Duplex“ option will make a Duplex option appear in iOS when you try and print to this printer. Other useful boolean options may include:

    • Duplex

    • Copies

    • Transparent

    • Binary

This example is cobbled together from other sources. Ryan Finnie’s blog was
quite useful (, as was tjfontaine’s airprint-generate script (