First, make sure your Pi has more than 2GB of available space. If so you can connect your printer via USB.
sudo apt-get install cups sudo apt-get install hplip sudo apt-get install hplip-cups sudo usermod -a -G lp pi sudo usermod -a -G lpadmin pi sudo cupsctl --share-printers --remote-printers --remote-admin sudo hp-check --fix sudo /etc/init.d/cups restart
Fire up your webbrowser and open http://IP-OF-YOUR-RASPBERRYPI:631
Select your printer under "Local Printers". If your HP printer is not detected you should recheck with hp-check! Yes you need all of that stuff!
You can now proceed with the usual way to add a new network printer. Test your setup with a testing page. If it's not working you better check /var/log/cups/error_log. Further you can try to print from your pi. If this works then CUPS is not working correctly. Recheck your printer configuration you did in the CUPS webinterface. Retry a couple of times and remember to kill all the failed jobs.
If everything works, have fun!