Hi Dear
Did you make any changes to the computer before the issue occurred?
What is the model number of the printer?
Method 1: I would suggest you to follow the steps provided below and check if it helps:
A. Open the Start menu, click on control panel and click on the "Printers and Faxes" icon. This will open a window with a list of the printers currently set up on your computer.
B. Double-click on the icon of the printer you want to change to online. A pop-up window detailing all current print jobs will open.
C. Go to "Printer" in the menu bar of the pop-up window and uncheck "Use Printer Offline." This action will change the printer from offline to online.
Method 2: Try to run the Fix it from the link below.
Important This section, method, or task contains steps that tell you ways to switch the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, confirm that you simply follow these steps carefully. For added protection, copy the registry before you modify it. Then, you'll restore the registry if a drag occurs. For more information about the way to copy and restore the registry, click the subsequent article number to look at the article within the Microsoft knowledge domain .
www.hp.com/go/wirelessprinting
When Does HP Printer Go Offline
WWW.HP.COM/GO/WIRELESSPRINTING –BEST HP WIRELESS PRINTING SOLUTIONS