For the HP Deskjet Plus 4100 Offline issue, try the following.
Firstly, disconnect the printer's power cord to do a hard reboot.
Press the Wifi button for 5 seconds after turning on the printer.
The printer is currently prepared for wireless connection.
Additionally, access the HP Smart app and select Add Printer.
Moreover, pick the HP Deskjet Plus 4100 printer during the setup.
Then adhere to the directions on the HP smart app.
The printer has been reconnected to the wifi and is now online.