If your printer is showing as offline, there are several steps you can take to get it back online:
Check Printer and Connections: Make sure the printer is turned on and properly connected to your computer or network.
Set as Default Printer: Go to ‘Devices and Printers’ on your computer, right-click on your printer, and set it as the default printer.
Clear Print Queue: Sometimes, pending print jobs can cause issues. Clear the print queue by right-clicking on the printer in ‘Devices and Printers’ and selecting ‘See what’s printing’.
Restart Services: Go to ‘Services’ on your computer, find ‘Print Spooler’, right-click and choose ‘Restart’.
Expert Tip: If all else fails, consider assigning a static IP address to avoid DHCP conflicts.
Source: HowToGeek