Check and make sure that all of the cables are firmly connected including the printer's power cable and the cable that connects the printer and your computer. Cables can seem connected but occasionally, they can work their way loose just enough to interrupt the contact.
Check the cables to make sure they aren't damaged. It's pretty common for a cable to become damaged if a chair with wheels has rolled over it a time or two. That would be enough to interrupt the connection between the computer and the printer. If it looks like you have a damaged cable, you'll have to replace it.
If the cables are well connected and undamaged and the printer is turned on, try rebooting the computer, then see if it will recognize the printer.
If those steps don't work, you'll probably need to uninstall and reinstall the printer software and drivers. It would be ideal if you had the original CD with the printer software on it, but those disks usually get lost over time.
The HP web site has a page that describes how to uninstall your printer's software:
Uninstalling Your Printer Software in Windows
If you don't have the original software disk, you can download the necessary software from HP's site:
Drivers and Software
I didn't find a web page that provided the specific instructions for reinstalling the printer, but you can download the user's manual from the site:
Printer User Manual page
I hope the solution is a relatively simple one, but if it comes to uninstalling and reinstalling the printer, it is a "do-able" task.
Post back your results and let everyone know which solution worked for you. Good luck.