Why it happens
Windows marks a printer offline when it stops getting a reply at the address it has stored. Most often the router handed the printer a new IP after a reboot, the printer dropped into deep sleep, or someone ticked the offline option by hand.
Fix it
- Open Settings → Bluetooth & devices → Printers & scanners, select your printer, choose Open print queue, then in the Printer menu clear Use Printer Offline and Pause Printing.
- Cancel every document sitting in the queue.
- Print the network configuration page from the printer panel and compare its IP with the one Windows uses (Printer properties → Ports). If they differ, that's your answer.
- Remove the printer and add it again, or add a new Standard TCP/IP port pointing at the current address.
- In your router's settings, reserve that address for the printer's MAC so it stops changing. This is the fix that makes it stay fixed.
- Restart the spooler: press
Win + R, runservices.msc, right-click Print Spooler → Restart. - If it only goes offline after idle periods, turn off the printer's deep-sleep timer in the embedded web server, and untick power-saving on your PC's network adapter.
A printer connected to a guest network, a mesh extender with its own SSID, or a VPN-protected PC will look offline even though everything works. Get both devices onto the same network first.