The 1018 is not supported by HP with the Mac OS Mountain Lion. I found this on an HP forum and it worked for someone else. You could try this:
Thank you for posting,
Unfortunately, HP laserjet 1018 is not suported in Mac OS X 10.8 Mountain Lion. How evere you can use the builtin drivers that goes along with the operating system and select teh driver of another printer and check.
Connect the printer to the computer and then go to System Preferences and click on Print and Fax. In the Print Fax window, lick on the Plus sign and you will find the printer, please select the printer and then under print using click on the drop down and click on "Select print Software" and in the list, please select HP Laserjet 1015 pr HP Laserjet 1022 and check.
If you don't find these printers in the list, please download and install the latest print driver version 2.12 from the apple web site using the link below.
After downloading and install the update, please try the steps given above.