Custom Interface Scripts
159
Custom Interface Scripts
You have three choices of interface scripts:
• npr.if provided in the host software
• A pre-defined script for your particular printer
• A script you have created yourself
The npr.if method is explained throughout this section. However, if you
have a pre-defined printer script or a script of your own, there are
certain modifications you must make in order for it to work with the
Internal Ethernet Adapter.
With the Internal Ethernet Adapter, the data must be captured and sent
over the network for printing, since your printer is no longer locally
attached. Use one of the following two methods:
1. Encapsulate your script’s code with brackets () and, after the
closing bracket, add a command to send the data to the Internal
Ethernet Adapter for printing.
2. Use npd as the print method.
Both methods are explained in detail below.
Modifying Your Script
If you choose to simply edit the script, you need to understand how an
interface file works. The structure of any standard interface file should
be as follows:
process options
(
generate printer setup characters
generate banner page data for each file
translate data to printer format
) |
communication program
where
communication program
is the program executing rsh/rcmd/
remsh or npwrite so the print job is redirected over the network to the
Internal Ethernet Adapter.
(
FILE=$6
#the spool file is found in the sixth parameter on System
V
cat $FILE | onlcr