If you need help understanding TCP/IP try the DOS window command NETSTAT with the "a" switch.
C:\jmm>netstat -a
Active Connections
Proto Local Address Foreign Address State
TCP ALTONTOWER:printer ALTONTOWER:0 LISTENING
TCP ALTONTOWER:ftp ALTONTOWER:0 LISTENING
TCP ALTONTOWER:135 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:5002 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:1025 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:1075 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:1119 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:137 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:138 ALTONTOWER:0 LISTENING
TCP ALTONTOWER:nbsession ALTONTOWER:0 LISTENING
UDP ALTONTOWER:1075 *:*
UDP ALTONTOWER:1119 *:*
UDP ALTONTOWER:nbname *:*
UDP ALTONTOWER:nbdatagram *:*
C:\jmm>
The nQ system is running two TCP/IP services ALTONTOWER:ftp and ALTONTOWER:5002 (An advanced HTTP service) ALTONTOWER is the IP address on 195.72.138.22. The program NQLPD is running the ALTONTOWER:printer service. These LISTENING services can accept a number of connections from "client" programs. e.g. ALTONTOWER:printer can accept multiple connections from remote client LPR programs. By convention, different protocols are offered on specially numbered ports. The "printer" port is number 515. You can find a complete list of port numbers in the services file. Only ONE service can listen on each port.
C:\WINDOWS>dir services.
Volume in drive C is ALTONTOWER
Volume Serial Number is 3C27-17F8
Directory of C:\WINDOWS
SERVICES 6,032 13/04/00 9:05 SERVICES
1 file(s) 6,032 bytes
0 dir(s) 1,843.63 MB free
C:\WINDOWS>
All RedTitan transform programs (EscapeE, RedPrint, nDP etc.) will accept data from TCP/IP.
The PrePrinter will accept TCP/IP connections on the PREPRINTER port. To be safe (to avoid a conflict) we must next edit the SERVICES file to add the preprinter port number. Choose an unused high number like 5056.
e.g.
preprinter 5056/tcp
nQ Dynamic Document Formatter - PrePrinter/DDF
|
Now we can test the PrePrinter. The PP command FROM TCP can be used in place of the FROM PATH command to start PP listening on the preprinter port.
|
nQ Dynamic Document Formatter - TCP/IP testing 1
We could go right ahead and install a spooler forwarding rule but to give us some confidence try connecting to PP using telnet. The command is :-
C:\WINDOWS>telnet 195.72.138.22 preprinter
C:\WINDOWS>
|
If the TELNET title bar looks like this then PP has accepted your connection. You may need to change Terminal Preferences to get local echo. Try a couple of prefixed commands like these. View the PP log window to see the activity. This should work from any host in the network.
|
nQ Dynamic Document Formatter - Rule table
Now choose Edit rules on the SPOOL tab.
Click on the icon y to insert a new rule. Create a rule that looks something like this. The STARTS and ENDS actions must be added before the TELNET action.
|
|
The STARTS action is intended to add a JOB TICKET to a PrePrinter data stream - LPRC is a formal parameter that gets substituted by the actual CLASS parameter of any job in folder(printer) called "ppfolder". In the following LPR example, the notation !!LPRC; is replaced by the actual Class parameter of the job r1.
e.g.
LPR -Pppfolder -S195.72.138.22 -Cr1 example.pp
The job ticket added to the data file is
(*PRE*)JOB STREAM=Nr1
There is more information on the parameters that are available in here.
When editing rule tables take great care not to create a loop and only refer to IP address that are running the appropriate service. The View console link on the SPOOL tab will help you follow the processing of the spooler rules. Remember - You need to stop and re-start the nqlpd spool to engage the new rule table.
|
nQ Dynamic Document Formatter - LPR support
The DDF/PrePrinter will also act as an LPR client. Here is a complete PP command file.
JOB MODE=HP,QUEUE=XTEST,LPRC=MYCLASS,LPR=195.72.138.22
FORMAT %PP will support LPRN, LPRJ, LPRC, LPRL, LPRP,
FORMAT % LPRH job ticket parameters
BREAK
PAGE
EOJ
PP uses the QUEUE job ticket switch to specify the printer folder name. (the DOS LPR client -P switch)
The parameter substitution features of the STARTS action will let you dynamically build a job ticket for the PrePrinter that will LPR the completed job back to the spool with sufficient information for a new rule to be able to forward the job to the final destination. The spooler will wait until the job is completed and keep status information. The data file is deleted when the action is complete.
nQ Dynamic Document Formatter - summary
In these examples we have used the IP address 195.72.138.22. In your tests you must specify your own IP address. The utility IPCONFIG may help. If you wish to experiment on a single host PC use the IP loop back address 127.0.0.1
The rule table is in XML format - NQRULES.XML. The rule table wizard pages are based on the XSL transform NQRULES.XSL. With care you may edit the XML directly.
© Redtitan Technology 1998, 1999, 2001, 2002, 2003, 2004