You can’t just enable print sharing on the iMac and have it work; however you can install an app like Printopia. Printopia and other apps like it (if any are left) will let you turn any printer connected to the iMac into an AirPrint printer. You can also set up virtual printers that will save PDFs to folders or open them in apps on the iMac.
The only downside is that your Mac must be on and a user logged in for the printer to work.
Here is a link to a ‘very’ old post I made on the subject. The apps and devices may have changed, but the options remain the same.
iPad Printing Solutions, and Stuff
I haven’t keept it updated because I both got an AirPrint capable printer (B&W Laser), and mostly stopped using my iMac. If I have fancier printing needs than AirPrint or Printer Pro can handle, I save my files as a PDF and take it to Staples. This happens rarely enough that it is cheaper than bying a more capable printer setup.