Update: These instructions also worked in Ubuntu Gutsy (7.10)
The LaserJed 1012 is supported by HP so it is a very easy printer to install.
Download the HP Linux Imaging and Printing System (HPLIP) from here.
Move the file from the download location to your home folder. If you downloaded the file to a directory other than your desktop change the following command accordingly:
mv /home/username/Desktop/hplip.2.7.6.run /home/username (where “username” is your usernam)
Run the Self-Extracting Installer:
sh hplip-2.7.6.run
When prompted choose the automatic installation mode.
At the end of the install you are instructed to restart your computer and run
sudo hp-setup
This didn’t work for me, hp-setup never started so I just used the Ubuntu “Add a Printer”
System >> Administration >> Printing >> New Printer
Follow the steps, choosing the “HP LaserJet 1012″ driver.
Your printer should now work!