Products   Support   Download   Contact

CREATING A PAN lp INTERFACE DRIVER

Contents | Index | About the Icons

Abstract

GrayMatter Software's ScriptServer® PAN Printing System is a distributed printing system which is supported on various architectures including Linux, Sun Microsystems' Solaris, HP's HP-UX and Tru64.

When it is not possible to modify legacy applications to directly utilize panpr, it is possible under both Solaris and HP-UX (and probably others) to create a printing subsystem model interface driver (MID) which makes the PAN appear as any other printer to the lp command. The technique discussed in this memo has been successfully employed by customers running ScriptServer PAN on both Solaris and HP-UX. This technical memo supersedes Technical Memo 107 (which was specific to Solaris), and discusses the issues in more general (cross-platform) terms.

Job Submission with panpr and lp

Typically, a PAN will accept jobs in a number of ways:

panpr provides a more feature-rich interface than the traditional lp/lpr.

When legacy applications already use lp and modifying them to use panpr is impractical, then there is no alternative to lp and a MID must be created to invoke panpr.

The Model Interface Driver (MID) Explained

Under the generic "lp" printing model, the spooler communicates with the printer device via a model interface driver (MID). Solaris ships with two, standard and netstandard, which will be found in /var/spool/lp/model; HP-UX ships with quite a few (they do make printers, after all) which will be found in /usr/lib/lp/model. These are ordinary shell scripts which can be edited with the text editor of your choice.

The MID is responsible for:

Both Solaris and HP-UX have GUI-based printer administration tools, and in our experience the path of least resistance is to use the GUI tool to create the printer. Some differences in the approaches are noted:

  Solaris HP-UX
type of printer to create network printer local printer with nonstandard device file
accessing queue name in the script
(should be the same as the name of the target PAN queue)
${printer} extract from $requestid with sed -e "s/-.*//g"
printer server the local host N/A
printer type PostScript/ASCII N/A
destination "PAN" (ignored) N/A
device N/A /dev/null
protocol (ignored) N/A
recommended template
(not used in the GUI, this is the particular extant model driver recommended by GrayMatter as the template for your custom driver)
/var/spool/lp/model/netstandard /usr/lib/lp/model/rmodel

Once the initial creation of the queue is completed in the GUI, the custom MID is applied to the queue using the lpadmin -i command.

Creating And Using the MID

GrayMatter Software will provide assistance to customers who are under support.

Basically the steps involved are:

  1. Copy the suggested vendor-supplied MID. (call it pandriver):
  2. Create a printer with the GUI-based Printer Administrator:
  3. Replace the GUI-applied MID with the pandriver MID using the lpadmin command:
    lpadmin -p printername -i /appropriate-directory/pandriver

That's it!

If you had a working queue which you converted as above, you can generally revert by simply reissuing the lpadmin command specifying the original MID instead of pandriver. (If you've specified custom -o options this may not work or may result in errors being logged when printing on the queue.)

© 2020 GrayMatter Software Corporation