Worked for me with HP LaserJet M1319f MFP:
Download and Install
Click the link, or cut and paste the whole command line below to download the driver.
$ wget -O foo2zjs.tar.gz
http://foo2zjs.rkkda.com/foo2zjs.tar.gz
Now unpack it:
Unpack:
$ tar zxf foo2zjs.tar.gz
$ cd foo2zjs
Now compile and install it. The INSTALL file contains more detailed instructions; please read it now.
Compile:
$ make
Optional: Get extra files from the web, such as .ICM profiles for color correction,
and firmware. Select the model number for your printer:
$ ./getweb P1005 # Get HP LaserJet P1005 firmware file
$ ./getweb P1006 # Get HP LaserJet P1006 firmware file
$ ./getweb P1007 # Get HP LaserJet P1007 firmware file
$ ./getweb P1008 # Get HP LaserJet P1008 firmware file
$ ./getweb P1505 # Get HP LaserJet P1505 firmware file
or
$ ./getweb all # Get all extra files
Install driver, foomatic XML files, and extra files:
$ su OR $ sudo make install
# make install
(Optional) Configure hotplug (USB; HP LJ P1005/P1006/P1007/P1008/P1505):
# make install-hotplug OR $ sudo make install-hotplug
(Optional) If you use CUPS, restart the spooler:
# make cups OR $ sudo make cups
Reference:
http://foo2xqx.rkkda.com/
All respect to original author