10

I've seen many a blog posting describing the process of using CUPS to present a non-airprint printer to iOS devices. However, I've dug high and low trying to find if anyone has figured out how to print to a printer that has an Airprint server baked in.

In particular, I've got a Brother HL-2340DW that works spectacularly from iDevices. If I understand Airprint correctly, iOS does not need to know anything in particular to print to said printer. It more or less spits a PDF over IPP at the printer, and the printer does its thing. The only configuration options I get in iOS is whether I want two-sided printing (defaulting to long edge, or whatever the printer's default duplex option is), and the paper size (i.e. letter vs a4).

What I don't want to do is install the binary drivers from Brother (not that I could on OpenBSD) so that I can speak "BR-3" or whatever proprietary printer control language they use. While I understand that their drivers would give me more flexibility in terms of print options, realistically I'm going to use this printer's defaults. In that sense, the more limited Airprint capabilities are perfect.

Has anyone successfully gotten one of the various unix print systems (preferably CUPS) to send a print job to an Airprint printer? Since IPP Everywhere seems to still be a dream, it seems Airprint-enabled printers would be a decent enough target for basic printing support, no? Or is the Airprint protocol more proprietary / obfuscated than I'm led to believe?

3
  • Have same problem. Did you found the answer?
    – AlexLocust
    May 5, 2016 at 8:58
  • Sadly, no! It seems like airprint would be an easy, generic target. I've just been too lazy to figure out how to code it.
    – Peter
    May 7, 2016 at 15:00
  • 1
    Nice guide here on how to do it: wiki.debian.org/DriverlessPrinting
    – frielp
    Apr 7, 2018 at 15:19

3 Answers 3

2

On ubuntu: sudo apt-get install printer-driver-all

This will install all open-source filter wrappers and PPDs. I tested it with 3 printers, they can print after "Add Printer" without downloading any proprietary software.

I don't know for OpenBSD, but if you have CUPS running, try this for your Brother HL-2340DW:

Search for Brother-HL-2170W-hpijs-pcl5e.ppd

I also tried feeding a raw PDF to the driver (using CUPS-PDF.ppd), but it does not work for my AirPrint printer.

2
  • "Brother-HL-2170W-hpijs-pcl5e.ppd" sounds like a PCL5e driver, which is not PDF. Sep 22, 2017 at 12:48
  • +1 you have a good point Apr 12, 2018 at 2:47
2

AirPrint is basically IPP + Bonjour + image/urf raster image format. In order to be certified as AirPrint compatible, a printer must support at least the image/urf format... but nothing stops it from accepting and announcing other formats too.

See: https://www.finnie.org/2010/11/13/airprint-and-linux/ and https://wiki.debian.org/AirPrint

Printing from an open-source CUPS to an AirPrint printer should be just a matter of discovering the printer's IP address, IPP port and basic capabilities using Bonjour mDNS, and assuming that there is at least one print job format that is supported by CUPS, it should Just Work.

Annoyingly, the URF format has not been publicly documented by anything other than a patent, however CUPS already includes a reverse-engineered urftopdf decoder for it. Because of the patent, however, producing and distributing a free URF format encoder might be legally tricky - and since it is possible there are some AirPrint printers that would only support URF, it would be necessary for "full" AirPrint support.

0

I set up my Brother printer (HL-L2370DN which looks like a version of the one in the question) with this command

lpadmin -p Brother -v ipp://xx.xx.xx.xx:631/ipp/print -m everywhere

where Brother is just an arbitrary name, and xx.xx.xx.xx is the printer's IP address. To my printer, I assigned a static IP address to not bother with mDNS, discovery and what not. After that the printer became visible in print in different programs.

The relevant CUPS documentation is here: https://www.cups.org/doc/admin.html and https://www.cups.org/doc/network.html.

I came across this question while searching how to set up my Brother printer, and "AirPrint" turned out to be somewhat of a false lead. Network printers should support the IPP protocol, which you can select by passing an ipp:// uri and -m everywhere. Perhaps this did not work when the question was asked, but now it should given that AirPrint is based on IPP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.