You have to execute following command in Terminal.
For Arch-Based Linux :
pamac install manjaro-printer
pamac install hplip
sudo pacman -S system-config-printer
Then, go to settings. You will see a printer option there. Then, click on it. Then, click on unlock. Add USB cable to USB hub. Then, click on add-printers. It will automatically find the printer. Then, when you will try to print then, HP Device Manager will prompt to install the printer. Then, you have to install by clicking on next->next->finish.
You can use cups also.