Class Driver guide for Advanced HPLIP Users

 

Table of Contents

1      Introduction

2       Install and Packaging

        2.1  Installer

        2.2  RHEL Packages

        2.3  “TAR” Package for Advanced Users

        2.4  Plug-in Package

3       HPLIP Installation Options

        3.1   Automatic Installation

        3.2  Custom Installation

           3.2.1  Class Driver Installation

           3.2.1.1   Class Driver Package Creation

4       Class Driver Installation Instructions

5       Class Driver Installation Using the TAR Package for “Advanced” Users

        5.1  Install from TAR Package

        5.2  Create DEB Package

        5.3  Install from RPM Package

6       Class Driver Package Content

7       Class Drivers Usage

        7.1  Installation

        7.2  Locate Driver Tool

        7.3  Configure a Queue

           7.3.1  Configure Queue using lpadmin

           7.3.2   Print

           7.3.3  Configure Queue using CUPS

8       Class Driver Limitations

1 Introduction

HPLIP supports printing through Discrete drivers. Discrete drivers are developed as per the product specification, that is, custom tailored to specifications for each product.

HPLIP is enhanced to provide support through “Class Drivers” now. The term “Class” refers to a set of devices that are uniform in their internal features. Such each set of devices can be supported through a single driver, which is called as “Class Driver”.

There are certain benefits with Class Drivers support, like

1. There is no dependency for a new Discrete driver to be used for using new devices

2. A large set of devices can be supported through a very few number of drivers

3. Print support on systems where disk space is a concern can now support all the printers with very minimal need on disk space for    drivers

4. Helps in special needs where a separate driver for each device is not preferred approach

5. HPLIP has been working well in the field for many years. So, Class drivers leverage on the proven quality of HPLIP

The recommended drivers continue to be Discrete drivers. Class drivers are suggested to be used only by advanced users.

Class Driver Classification:

The below diagram depicts the set of Class drivers                            

 

Class Name

Sub classes

PCL3

PCL3GUI2

hp-PCL3-Class1
hp-PCL3-Class2

hp-PCL3-Class1A
hp-PCL3-Class1B

PCL3GUI

hp-PCL3-Class3
hp-PCL3-Class3A
hp-PCL3-Class3B

PCL3

hp-PCL4-Class1

PCLM

hp-PCLM

PostScript

hp-postscript-inkjet

hp-postscript-laserjet

hp-postscript-laserjet-pro

LJ

hp-LJ-Class1

hp-LJ-Class2

hp-LJ-Class3

hp-LJ-Class4

hp-LJ-Class4A

hp-LJ-Class5

hp-LJ-Class6

 

2 Install and Packaging

2.1 Installer

The below diagram depicts the installation flow with Class driver inclusion.

  

HPLIP Installer provides the option of selecting either ‘Automatic Installation’ or ‘Custom Installation’ options.  On selecting the ‘Automatic Installation’ option, all the components of HPLIP will be installed. The drivers installed in this flow are the Discrete drivers. This is the recommended way of using the HPLIP drivers. 

‘Custom Installation’ is suggested to be used by Advanced users, those who understand the choices they are making. This option allows users to select either discrete drivers or class drivers.  On selecting ‘Discrete Driver”, users can choose which components of HPLIP they need along with Discrete drivers.

For ‘Class Driver’ path, user can select either Installation of class drivers or Creation of ‘class drivers only’ package.  On selecting ‘Create package’ option, users will be prompted to select the package type to be created. 

Detailed instructions on Installation options are available in the following sections.

2.2 RHEL Packages

HPLIP supports RHEL through a separate RPM package. The class driver RPM packages for RHEL 6 & 7 can be downloaded from https://developers.hp.com/hp-linux-imaging-and-printing/gethplip . This package provides the Print only feature.

2.3 “TAR” Package for Advanced Users

HPLIP publishes a TAR package containing the entire source code of HPLIP (other than Proprietary plug-ins). This is to aid users who possess technical skills required for building HPLIP and hence can use HPLIP for their customized purposes.

Class Drivers source code is included as part of this TAR package. More details can be found at section5

2.4 Plug-in Package

Installation flows for Discrete drivers will take care of installing proprietary plug-ins as required.

For the Class Drivers install paths, users can download the plug-in package from one of the below locations.

https://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/

https://developers.hp.com/hp-linux-imaging-and-printing/plugins 

The downloaded “hplip-.x.xx.xx-plugin.run” installer can be used to install the required plug-ins.

3 HPLIP Installation Options

The various options available in the HPLIP Installation flow are explained below.

3.1 Automatic Installation

Automatic installation installs all the dependent packages required for HPLIP.  Once the dependent packages installation is complete, it installs the HPLIP discrete drivers for Print, Scan, Fax and Toolbox features.  This is the recommended way of installing HPLIP.

3.2 Custom Installation

Custom installation provides the option of either installing the discrete drivers or class drivers. On selecting ‘Discrete Driver”, users can choose which components of HPLIP they need along with Discrete drivers. For example, Scan support, Network support, etc. Based on user’s choices, Installer proceeds to install required 3rd party dependencies and the selected HPLIP components.

For ‘Class Driver’ path, user can select either Installation of class drivers or Creation of ‘class drivers only’ package. On selecting “Installation”, components required for ‘Class driver (print) only’ will be installed. On selecting ‘Create package’ option, users will be prompted to select the package type to be created.  Appropriate package will be created based on the input selected.

Selection of class drivers would further provide option to either install or package the class drivers

3.2.1 Class Driver Installation

Class driver installation option installs the class drivers on the machine.  The class driver installation provides only the print feature.

3.2.1.1 Class Driver Package Creation

Class driver package creation provides the option to create one of the below mentioned packages -

  • TAR package – Provides hplip-x.xx.xx.tar.gz package which would contain the binaries and support files required for print feature.  This feature is available for all the Linux distros supported in HPLIP.
  • DEB package – Provides hplipclassdriver-x.xx.xx.deb package which can be installed on all the Debian based systems supported by HPLIP.
  • RPM package – Provides hplipclassdriver-x.xx.xx.rpm package which can be installed on all RPM based systems supported by HPLIP.

 4 Class Driver Installation Instructions

 Follow the below instructions to install Class Drivers.

1. Run “sh hplip-x.xx.xx.run” command to install HPLIP.

2. Select custom installation as shown below:

  

      3. Select Class Drivers(‘c’) option as shown below:

 

      4. Select install option(‘i’) to install the class drivers on current machine or create package option(‘p’) to create the class driver package: 

 

      5. Based on the options selected by the installer would create either TAR, DEB or RPM package.  In Debian based distros, the TAR and DEB options are available and in RPM based distros, the TAR and RPM options are available

 

5 Class Driver Installation Using the TAR Package for “Advanced” Users

HPLIP publishes a TAR package containing the entire source code of HPLIP (other than Proprietary plug-ins). This is to aid users who possess technical skills required for building HPLIP and hence can use HPLIP for their customized purposes. 

This tar package gets published at

 https://developers.hp.com/hp-linux-imaging-and-printing/gethplip.

Class Drivers source code is included as part of this TAR package.

5.1 Install from TAR Package

The class drivers can be installed from the downloaded “hplip.x.xx.xx.tar.gz” file by executing the below set of commands.

Step 1: Extract the files from the downloaded tar ball

tar -xvf hplip-3.17.11.tar.gz

 

Step 2: Configure for class driver installation

 

cd hplip-3.17.11

./configure --prefix=/usr –enable-class-driver

 

Step 3: Run Make

 

make

 

Step 4: Run Make Install

 

sudo make install

 

This will install the class driver for print functionality.

5.2 Create DEB Package

Follow the below instructions if a DEB package is required to be created by making use of the Advanced Tar package.

Step 1: Extract the files from the downloaded tar ball

 

tar -xvf hplip-3.17.11.tar.gz

 

Step 2: Configure for class driver installation

 

cd hplip-3.17.11

./configure --prefix=/usr –enable-class-driver

 

Step 3: Run Make

 

make

 

Step 4: Run Make deb

 

sudo make deb

 

This creates the class driver .deb package which can be used to install class drivers on Debian based Linux flavors. 

If HPLIP is already installed on the system the driver needs to be uninstalled before installing the .deb package or the deb package need to be installed with the “–force-all” option as part of the step ‘dpkg’ command to have clean installation of class drivers.

5.3 Install from RPM Package

Follow the below instructions if a RPM package is required to be created by making use of the Advanced Tar package.

Step 1: Extract the files from the downloaded tar ball

 

tar –xvf hplip-3.17.11.tar.gz

           

Step 2: Configure for class driver installation

 

cd hplip-3.17.11

./configure --prefix=/usr –enable-class-driver

 

Step 3: Run Make

 

Make

 

Step 4: Run Make rpm

 

make rpm

 

This creates the class driver .rpm package which can be installed on other RPM supported distros.  

If HPLIP is already installed on the system the driver needs to be uninstalled before installing the .rpm package for a clean installation.

6 Class Driver Package Content

The below list contains the contents of class driver installation or packages. 

       Class PPD’s for PCL3, PCLM, LJ and Postscript devices

       hp-locatedriver

  •     Tool to assist finding the appropriate class PPD for any given model

       hpcups

  •     Print filter for Raster data

       hpps

  •     Print filter for Postscript data

       Models.dat

  •     Contain all the supported device models

       hplip.conf

  •     Contains the HPLIP configuration information

7 Class Drivers Usage

7.1 Installation

Installation usage details are provided under section4 and section5

Choose the installation path that suits your needs and install Class Drivers following the instructions.

7.2 Locate Driver Tool

The ‘hp-locatedriver’ tool is provided as part of class driver installation/package. This tool can be used to get the class PPD name for a printer.  The usage of this tool is as shown below.

hp-locatedriver --m=<device_name>

 

7.3 Configure a Queue

7.3.1 Configure Queue using lpadmin

The Print queue can be configured using the lpadmin command as shown below:

7.3.2 Print

Once the printer queue is configured, user will be able to initiate a print

  1. From applications printer dialog or

  2. By using the ‘lpr’ command as shown below:

7.3.3 Configure Queue using CUPS

The Print queue can be configured using the CUPS web interface available at http://localhost:631

Step 1: Open http://localhost:631 in a web-browser. Select ‘Adding Printers and Classes’ option.

 

 

Step 2: Select the ‘Add Printer’ option to display the list of devices available on USB or on Network.

 

Step 3: Select the appropriate printer to be added.

 

Step 4: The printer name, description and location can be set as accordingly.

 

Step 5: The ‘Add Printer’ page will provide the option to select the class drivers either from the model list or by manually browsing the Provide a PPD file option.

 

Step 6: Once the printer is added the print queue would be created for the selected device. Print can be initiated from the applications by selecting the configured driver.

8 Class Driver Limitations

  • Class driver limitations: Class Drivers are not tailored to specific needs/capabilities of devices

               Difference in final output as compared to output from Discrete drivers could be seen
               Class Drivers are based on sub-set or super-set of capabilities and standardization of features/values as may required
               UI dependencies on PPDs may be impacted

  • New Devices with significant difference in internal device features/support may not have acceptable quality with Class Drivers