We know it was possible to print to non-HP printers at some point during the iOS 4.2 beta testing process, equally we also know that it was possible to use AirPlay on an iPhone 3G and a second-generation iPod touch. These uses disappeared, but trust to the ever inventive Mac dev community to figure out a workaround — hurrah for them!
To enable printing is so easy someone’s made an AppleScript that does it for you. Unfortunately the host site’s in German and even in translation I can’t make much sense of it, but I have learned that iOS seems to send a PDF of whatever you wish to print to an enabled printer using a printer description file called URF. See more here.
The second workaround (thanks to CoveringWeb) involves using Redsn0w 0.9.6b3: Here’s the steps:
STEP 1: Download Redsn0w 0.9.6b3 (Windows – Mac OS X). STEP 2: Download iOS 4.2.1 original firmware from here. STEP 3: Connect your device into your computer via USB and launch Redsn0w you download in step 1. Click on browse and point it to the original iOS 4.2.1 firmware of your device and wait while it’s recognized. STEP 4: Now you have to check on Enable Multitasking, other items are optional. STEP 5: Put your iPhone into DFU mode by following the instructions on the screen: • Hold down the Power button for 5 seconds. • Without releasing the Power button, also hold Home buttons together for 10 seconds. • Now release the Power button but keep holding the Home button for 15 seconds. STEP 6: Once done, your iPhone will be rebooted and you’ll get AirPrint on iPhone 3G ad iPod touch 2G.
In future when you open a page in Safari, you’ll see the Print button by clicking on the share icon at the bottom.
(That image up top comes from MacFun, link in text above)