Hi there and welcome
Are you printing from a windows or Mac computer? And does it print from other programs ok? Or no programs will print to it?
Is the printer connected to the computer via a USB cable or wireless?
Can you remove the power to your wireless router, the iMac and the printer and wait 10 minutes.
Then connect the power to the wireless router and wait 5 minutes.
Connect the power to your printer and wait 5 minutes.
Then power on the iMac and tell me if it now can print please.