Unable to connect wifi printer

I also had problems connecting a wifi printer. In my case it was an HP DeskJet 3835, using an RPI-5 with KDE unstable branch.
In the end the following commands succeeded:

sudo gpasswd -a “user” sys
pamac install print-manager
sudo systemctl enable --now cups.service
sudo systemctl enable --now cups.socket
sudo systemctl enable --now cups.path
lpadmin -p “printer name” -E -v ipp://“printer fixed IP”/ipp/print -m everywhere

Replace the “quoted” items with your values. For instance, for me “printer name” was HP3835.

I also had issues recognizing the device as a scanner, but that’s another story.
See https://forum.manjaro.org/t/scanner-programs-do-not-find-a-scanner/