apt-cache search hplip
sudo apt install hplip hplip-gui
- Connect the printer to the pc;
- Open the hplip toolbox;
- Click on Setup Device;
- Select the Connection type;
- Select the discovered device;
- Install the simple scan (on the store);
https://www.cyberciti.biz/faq/how-to-install-networked-hp-printer-and-scanner-on-ubuntu-linux/