I have a not-so-new HP LaserJet 1020 that works fine. Ubuntu recognized it, but on printing it did not do anything, except the document disappeared from the queue as if it had been printed. I looked up this problem and I installed hplip and entered this command to the terminal window:
sudo hp-setup -i
Than all looked fine, but in the end, when trying to download the plugin it displayed a red error message saying:
error: plugin download failed error code = 4
error: file does not match its checksum. File may have been corrupted or altered
error: Failed to install Plugin.
error: The device you are trying to setup requires a binary plug-in.
Some functionalities may not work as expected without plug-ins.
Please run 'hp-plugin' as normal user to install plug-ins.
Visit http://hplipopensource.com for more infomation.
EDIT: my problem has been finally solved, and hplip was not needed. I had to install foo2zjs, an open source driver, that (I believe) was created for this issue. If you have the same problem, install foo2zjs according to the instructions on http://foo2zjs.rkkda.com/ . After installation run hp-setup again. That worked for me.