Enable Apple AirPrint support on any USB Printer with a Raspberry Pi
1. Install Raspbian on a SD card
2. Mount SD card on some machine and navigate to /. Add a file called ssh and set up wpa_supplicant.conf for WiFi access. Now you have headless and don't need a keyboard or monitor.
3. Boot. Login. sudo raspi-config. Change password.
4. Connect printer via USB cable
5. Then execute the following sequence of commands to set up CUPS and make it accessible on the network.
sudo apt-get full-upgrade
sudo apt-get install cups
sudo usermod -a -G lpadmin pi
sudo cupsctl --remote-any
sudo systemctl restart cups
6. Visit http://raspberrypi:631/admin and add the local printer. Make sure "sharing" is enabled on the printer.
7. Then make sure AirPrint is set up
sudo apt-get install avahi-daemon
Printer should work now via AirPrint.