I’m not 100% sure if this will work for your printer but it is free so I would give it a go.
I’m assuming the iMac is wired with ethernet into your modem.
There is a option built into OS X for your iMac to appear as a Wifi router. Note that the wifi can can only do one thing on the iMac. Act as a router or act as a client.
So basically. Try this. Apple Menu—> System Preferences—> Sharing
http://imgur.com/a/YNtdn
Make it look like that.. Then hit Wi-fi options in the lower right.
http://imgur.com/a/rUrAb
Network name is the SSID. It can be anything. But I would avoid using spaces or special characters to be safe. Leave the channel alone and leave security off for the moment.
Then click the checkbox to the left of the internet sharing box and you should get this.
http://imgur.com/a/wT14L
Hit start and hope it works.
I would note that the range when you do this isn’t nearly as good as a normal router with external antennas. But if the printer is close it should be fine.
If it works then I would go back and modify the security settings and set a password.