Accessing the firmware update from the printer's physical menu interface is your best option. If this is unable to connect, then it either means you have a networking issue of some sort (local with the printer, or home network/router, or ISP), or HP servers are having an issue. Try power cycling the printer and making sure the printer is connected to the home network by verifying a local IP address or checking the router to confirm the HP printer is on the network.
Power cycling the printer and the computer can sometimes fix some issues.
As for trying to run an app from the Mac, try booting into Safe Mode and trying again, although if the printer is connected using a driver, then this may not work to allow communication...all depends how the app communicates with the printer. If Safe Mode works to allow the firmware update, then it most likely means you have some third party software installed which is interfering with the normal operation of macOS.
While I normally encourage keeping devices up to date, HP has a terrible history of bricking printers with firmware updates if people are using third party ink cartridges or sometimes introducing or changing functionality without any notice to the user. You may want to research this firmware version online to make sure others don't regret updating the firmware to this particular version. If you never use third party cartridges, then you are probably reasonably safe in updating the firmware to resolve the PDF printing issues (PDF issues are always a common issue with HP printers).
I've never used any HP apps to update printer firmware. Years ago I would either update the firmware from the printer's JetDirect web interface, or by sending the firmware over FTP to the printer, or some printers allowed for sending the firmware via a normal print job. The easiest method should be from the printer's own physical interface or perhaps even the printer's web management interface (type the IP address of the printer into the URL bar of a browser to access...if the web interface exists).