If an HP printer is connected to a wireless network, and the connection drops while printing, its status will be listed as offline on the PC. However, you can follow the basic troubleshooting steps for HP printer not connecting issue and make optimal use of its wireless capabilities.
If you are downloading something on the computer, stop it prior to proceeding with the below steps:
In case the wireless connection is still dropping, move on to the next step.
Changing the SSID of Wi-Fi network that is used to connect to the printer might resolve the HP printer not connecting to the device problem. If you have several routers with the same SSID, changing one to make routers identifiable will fix the issue due to wrong wireless connection or drops in the connection.
Note that after altering the wireless network name, you should reconnect compatible devices or a computer to the right network as the printer was connected to.
On the setup page of the router, find the menu that let users alter the network name.
In case following the above steps does not help to reestablish the connection, contact HP printer support professionals for a thorough diagnosis of the wireless printer.