I have an old HP Officejet 2620 printer that works perfectly. Unfortunately Apple and HP do not support this printer in Big Sur onwards.
Instead of throwing away a perfectly working printer, I re-purposed one of my old Raspberry Pi 2 units and plugged the printer to it using the USB cable. Below are the steps I ended up following to convert the setup into an Air Print server.
-
Follow instructions from https://pimylifeup.com/raspberry-pi-airprint/ to set up your Raspberry Pi.
-
Before adding your HP Printer using the ttps://192.168.0.40:631 web UI, install HP Cups Drivers as below;
sudo apt update
sudo apt install hplip system-config-printer
-
Pick the correct HP Cups driver for your printer while adding it, or modify later and change the driver.