Enable AirPrint with a router?

Solution 1:

Apple routers generally have no viable software you can customize. Other generic and third party routers often can be flashed and updates. It might be possible to get this working on routers that are able to run pared down versions of Linux (such as DD-WRT or Tomato) in place of their stock firmware. Linux can do AirPrint sharing of standard printers with a combination of CUPS and avahi (Bonjour) following instructions you can find here. Some of the 3rd party router firmwares already have CUPS configured, and I suspect you could get avahi working on them as well, there may be a pre-built version, but you may have to compile yourself.

Bottom line, given a compatible router, you should be able to do it, but it will require a fair bit of hacking and googling. There's no turn-key solution that I'm aware of, and of course this only works with routers that can use 3rd party firmware (there's a pretty good selection, but definitely not all), and Apple base stations definitely won't work unless Apple itself adds the functionality.

Solution 2:

You'll need a TomatoUSB compatible router with at least one USB port, which you can pick up for as low as $24 dollars on Amazon.

Like another user pointed out, TomatoUSB is a opensource router firmware that is based on Linux. The solution involves installing CUPS, Avahi, Dbus and other software to complete the printing chain.

Below is a tutorial I just wrote on how to setup AirPrint on a TomatoUSB router.

Keep in mind this isn't bulletproof and fully tested, but it works. Please comment and provide feedback if you try it (working or not working).

[Tutorial] Apple AirPrint on TomatoUSB Router http://blog.qnology.com/2013/03/tutorial-apple-airprint-on-tomatousb.html

As an added bonus, you can even set it up to do Google CloudPrint (some bugs still needs to be worked out). CloudPrint will allow you to print from any computer using Chrome over the internet (it also works with the iPhone Chrome app). You can even share the printer, so your friends and family can use it. Maybe set it up for the grandparents (along with a photo printer) so you can magically send them prints of the grandkids?

As mentioned by another user, the PogoPlug (E02) "hacked" to run ArchLinux ARM (ARLARM) is another great solution. Personally this is the solution I use. The PogoPlug can be bought for around $20 and is way more powerful in terms of CPU power than any router. Sorry at this time I don't have instructions for setting up AirPrint on the PogoPlug. However, I do plan on writing a tutorial in the near future and will update this answer when its available.

[Edit] - Tutorial for setting up AirPrint and AirPlay on PogoPlug (Recommended Solution)