There could be a poor connection strength between the printer and your router. Also, when outdated printer drivers are in use, printer offline errors might happen more frequently due to the lack of responsiveness.