If your HP printer shows offline on your Windows or Mac computer, here are some easy fixes to resolve the issue:
For Windows
Fix 1: Turn Off Offline Mode
Press the Windows Start button on your PC.
Open Control Panel.
Select Hardware and Sound > View Devices and Printers > Printers and scanners” to see all your connected printers.
Look for your HP printer in the list, then select it.
Click on “More devices and printer settings.”
You’ll see your HP printer again.
Right-click on it, and then click on “See what’s printing.”
Select the “Printers” tab.
See if the “Use Printer Offline” mode is unticked. If it is not, unselect it.
Fix 2: Clear Print Queue
Click on Windows Start.
Open Settings.
Select Bluetooth & Devices > Printers & Scanners.
Select your printer.
Click Open queue or See what’s printing.
Click on the Printer menu at the top.
Select “Cancel All Documents.”
Click on Yes, then restart your printer.
For Mac
Fix 1: Remove and Re-add the Printer
On your Mac, click the “Apple” icon at the top left corner.
Select “System Preferences” from the menu.
Click on “Printers & Scanners.”
Choose your printer from the list.
Look for the (+) & (-) signs. Select the (-) icon to remove the printer.
Click on “Reset.”
Once the printer reset is done, click the (+) icon to re-add your printer.
Fix 2: Temporarily Disable VPN or Firewall
Click the Apple icon, and select System Settings.
Click Network.
From the list that appears, find your VPN connection.
Click on it and select “Disconnect.”
Source:- HP Printer Offline Fix