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:
Download Redsn0w 0.9.6b3 (Windows – Mac OS X).
Download iOS 4.2.1 original firmware from here.
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.
Now you have to check on Enable Multitasking, other items are optional.
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.
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)