Network Printing Utility
The Network Printing Utility (npu) is a network printing program which sends print jobs to printers connected across an Ethernet Local Area Network (LAN) using TCP/IP or OSI protocols, or across an X.25 Wide Area Network (WAN). In order to do this, npu makes use of the communications facilities provided as part of UNIX-Connect (note that these facilities can be enabled independently of UNIX-Connect).
npu may be called from the UNIX lp command, from the Reality Despooler, or by user-written scripts and application programs. The Network Printing Utility product includes scripts to interface to both UNIX lp and to the Reality Despooler, but user-written application programs must call npu with the required command line options (see npu Command for details).
Overview
ROUTE-FILE Entries
In order to build a connection to a printer, npu uses routing information held in the ROUTE-FILE. Given a ROUTE-FILE destination entry and the required command line options, npu builds a circuit to a network-connected printing device, sends data to that device and then performs an orderly disconnect.
Protocols
Communication may be over a TCP/IP, OSI or X.25 network as specified in the destination entry in /etc/ROUTE-FILE.
Note that the UNIX-Connect communications interface provides for orderly disconnection over TCP/IP and X.25 networks, but not over OSI. Orderly disconnection over OSI is provided by implementing additional protocols in npu itself. These additional protocols are:
SPAG Y/13 This protocol is used where a host is required to use OSI to communicate with a printer attached to an X.25 PAD (with X.25 connectivity provided by Satelcom NetworkX nodes).
DDA Port Services For devices that support the DDA Port Services Protocol (MPS, MPTS), this protocol provides a mechanism for end of data synchronisation.
MPS FF This protocol is specific to the MPS. npu sends a single X‘FF’ character to indicate end of data, and the MPS responds with a single X‘FF’.
There are also two protocols available for use over TCP/IP:
Telnet This protocol is used for connection to some types of terminal server.
LPR This protocol is used for connection to an LPD daemon or to a network printer interface such as the Mannesmann Tally In Line or Hewlett Packard JetDirect.
Note
The LPD daemon is not available on some types of UNIX system.
No protocol is necessary when connecting to NEC terminal servers over TCP/IP.
Note
The required protocol must be specified in the destination ROUTE-FILE entry for the particular printing device. For OSI connections, failure to specify a protocol could lead to loss of data.
The following table lists the protocols you should use for different types of connection:
Connection to |
Network type |
Protocol |
---|---|---|
Annex, MPS, MPTS. |
TCP |
None |
Terminal servers other than those above. |
TCP |
Telnet |
LPD daemon, Network printer interface. |
TCP |
LPR |
MPS. |
OSI (null- or full-network) |
MPS 'FF' |
MPS, MPTS. |
OSI (null- or full-network) |
DDA |
X.25 PAD (via NetworkX). |
OSI (null- or full-network) |
SPAG Y/13 |
- |
X.25 (connection may be via NetworkX) |
None |
Printer Sharing
The Network Printing Utility supports sharing of printers between different hosts on the same network.
If printer sharing is enabled, npu delays handing back control to the calling program after a print job has been successfully completed (this functionality is referred to as the end-of-job delay). This holds back any further print jobs from the host that is currently printing and allows other hosts to connect to the device. If printer sharing is not enabled, there will be no end-of-job delay and other hosts will only be able to connect if the host that is currently printing has no further print jobs ready to send.
If on the first attempt, the printing device refuses the connection, npu will keep trying until the connection is established, or a specified number of retries is reached. (npu will not attempt further retries if any other error is returned.) You can specify the delay time between retries. If a delay time is not specified, a default value of 15 seconds is used.
If printer sharing is enabled, the delay time between retries is also used as the end-of-job delay.
Printing from Reality
The Reality Spooler allows a single Despooler to service multiple formqueues. The Network Printing Utility extends this by allowing you to associate each formqueue with a different printer.
Character Mapping
npu can carry out character mapping - that is, specified characters can be replaced with alternatives before printing. For example, a particular printer might require:
-
Each line feed (LF) character to be preceded by a carriage return (CR). That is, each LF to be converted to CRLF.
-
TAB characters to be converted to a number of spaces.
Note
npu supports “one-to-one” and “one-to-many” character mapping, but not “many-to-many” character mapping.
Prologue Data
Prologue data may be used to send commands to a printer before any print data is sent. For example, you could set the printer into portrait or landscape mode.
Prologue data is not subject to character mapping.