So many times, I have seen people dealing with the
hp printer offline problem due to the network communication problem. so I will suggest you to check for the printer software and get your problem resolved by following the instructions given below.
1. Power off your printer and wait for one minute.
2. Wait for 3 minutes and then try to check, if your printer is connected to the wifi. if it is not. you need to go ahead and connect to the wifi.
3. Make sure your computer is also connected with the same network.
4. Now try to print a document. I am sure, it will start printing.