Printing with HP printers is best(?) facilitated using the hplip software. There are at least two sources for the software (1) the LM repositories and (2) developers.hp.com. Obviously, it is best to use the software in the repository if it supports your printer.
- Determine the version of hplip in the LM repository:
Code: Select all
$ apt-cache policy hplip
- Determine if the hplip software in the LM repository supports your printer.
- Go to The Supported HP Printer index page
- Search for your printer.
- Finding your printer and compare the version of hplip that first supported your printer against the version available in the repository. If that in the repo is later than the first supporting your printer, install from the repo (see below). Otherwise, if your printer requires a version of hplip newer than is available in the repos or your printer is not listed amongst the supported devices (the list may not be updated in a timely fashion) compile and install from source (see further below).
Execute each of these commands in turn, understanding that each will require some configuration information.
Code: Select all
$ sudo apt install hplip hplip-gui xsane
$ hp-setup
$ hp-plugin
- Installs the hplip (and supporting) packages
- Starts the printer configuration process. The user will be required to help the software "discover" the printer and enter other configuration information.
- This command is necessary only if your device has a scanner
Installing from source
- Download the source code tar file. The link to the file can be found in the "Advanced Option" of this page. At the time of this writing, the file is hplip-3.18.9.tar.gz
- Open a terminal window and
cd
to the folder into which the tar file was downloaded. - Execute the command
Code: Select all
tar xf hplip-3.18.9.tar.gz
cd hplip-3.18.9
- Install all the packages necessary for a successful compile and installation (note that some of these packages may already be installed):
Code: Select all
apt-get install --install-recommends build-essential libjpeg-turbo8-dev avahi-utils cups libcups2 libcups2-dev cups-bsd cups-client libcupsimage2 libcupsimage2-dev libdbus-1-dev g++ ghostscript cups-filters ghostscript-x libssl-dev libsnmp-dev snmp libc6 libtool libtool-bin libusb-1.0-0-dev make wget policykit-1 policykit-1-gnome python3-dbus python3-gi python3-dev python3-notify2 python3-pil python3-pyqt4 gtk2-engines-pixbuf python3-dbus.mainloop.qt python3-reportlab python3-lxml sane libsane-dev sane-utils xsane python-dev python-qt4 python-qt4-dev python-pyqt5 python-dbus
- Configure ....
Code: Select all
./configure --prefix=/usr --with-hpppddir=/usr/share/ppd/HP --libdir=/usr/lib/x86_64-linux-gnu --enable-qt4 --enable-hpcups-install --enable-cups-drv-install --disable-cups-ppd-install --disable-hpijs-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-foomatic-rip-hplip-install --enable-fax-build --enable-dbus-build --enable-network-build --enable-scan-build --disable-policykit --disable-libusb01_build --disable-udev_sysfs_rules --enable-doc-build
- Compile the source
Code: Select all
$ make
- Install the software
Code: Select all
sudo make install
- Configure for the printer
Code: Select all
$ hp-setup
- (Optional, if you have a scanner)
Code: Select all
hp-plugin
- Perform steps 2, 3 (if necessary), 4, and 6
- Execute
Code: Select all
sudo make uninstall
dpkg
to install/uninstall and remove the need to retain the tar file.