Hello again,
AirPrint should be enabled on the printer, but it would not be a bad idea to verify that it really is:
http://h10032.www1.hp.com/ctg/Manual/c05028990#airprint
Would it be correct to assume that the HP PageWide Pro 577dw MFP is connected to a Wi-Fi network/router (wirelessly, or via Ethernet to a LAN port in the router), and that your iMac is connected to the same Wi-Fi network? That is, you are not using a USB connection to the printer.
It is important that the router allows Bonjour/mDNS (you may want to check that this is enabled in the router settings).
You could use an iPhone (or iPad) to check whether the 577dw would be selectable as an AirPrint printer when you try to print from there.
If necessary, try to reset the printing system and re-add the printer.
Reset the Mac printing system to solve a problem - Apple Support
Jan