Why Does My HP Printer Keep Going Offline?

I am always facing the printer offline every time I try to print. I don’t know how to fix it. I have run the troubleshooter but no luck. My Wi-Fi router is working fine there is something wrong with my printer. I needed to print some documents for my office meeting. Please help me to make the connection and print it properly.
Response by [Kelvin Morton]
Firstly restart your printer. If it shows offline then try to download and run HP print and scan doctor. Next, open the application, find your printer, and then click on fix printing issues. It will fix the offline issues in 90% of cases. If there is no luck then go through the detailed solutions from our blog why does my HP printer keep going offline? (Note:-Mac users need to download and install the HP Smart app for Mac to fix the issue)