The printer was probably previously unset as a network printer. To use wifi it must be a network printer (shared in Windows terminology). I'm assuming the desktop PC was a Windows computer. Windows chooses the printer settings and enables it on HP printers. To connect to some printers wifi (shared) with Linux you must set the printer manually using the printer physical interface itself first. Once you connected it to Windows, Windows set the printer for you and you were able to connect from Linux. Nasty HP MS black magic at work. Curses.
TC
TC
All opinions expressed and all advice given by Trinidad Cruz on this forum are his responsibility alone and do not necessarily reflect the views or methods of the developers of Linux Lite. He is a citizen of the United States where it is acceptable to occasionally be uninformed and inept as long as you pay your taxes.