PROBLEM 3: How do I print to Windows NT 3.5x and 4.x servers from an HP-UX machine?
Configuration:
Operating System - HP-UX Version - 10.20 Hardware System - HP 9000 Series -800
SOLUTION
You need to setup the printer on the UNIX side as remote printer with bsd printing and install the LPDSVC on the NT box to accept print jobs.
Assuming you have the following two systems:
hpux1 10.20 -->PRINTER NAME: ntprinter ntsys NT 4.0-->PRINTER NAME: laser1
If you are using DNS and have both the UNIX system's hostname and ip address as well as the NT hostname and ip address then you won't have to edit either hosts file. (Skip step 5.) DNS will take care of name resolution for all.
PRINTER NAME: ntprinter <can be anything, independent of NT printer name> REMOTE SYSTEM NAME: ntsys REMOTE PRINTER NAME: laser1 REMOTE PRINTER IS ON A BSD SYSTEM: >>>>make sure and check this box REMOTE CANCEL MODEL: rcmodel REMOTE STATUS MODEL: rsmodel
lp -dntprinter /etc/hosts
You should get the hosts file printout on the NT box and should also be able to see the job in the NT print manager spooler. The file is small so try a larger file if needed.
NOTE: If you run lpstat -t and look at the messages, you will see a warning: connection to ntsys is down, even though print jobs are going through without problems.
This seems to be an anomaly with the connection from HP-UX to NT system and remote printing. As long as you are getting print jobs spooled to the NT spooler, everything is working OK.
There are a few changes that you may need to make on the Windows NT system registry. Here are the steps:
For Windows NT 4.0 to assign the RAW datatype, regardless of the control file contents, do the following:
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.
\SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters
Value Name: SimulatePassThrough Data Type: REG_DWORD Data: 1
NOTE: The default value is 0, which informs LPD to assign datatypes according to the control commands.
Configuring SimulatePassThrough In Windows NT 3.51
In Windows NT 3.51 the code looks for a registry setting in the LPD key instead of the LPDSVC key. You can work around this problem by creating an LPD key at the same level as the LPDSVC key and then duplicating the information in the LPDSVC key to the LPD key.
For Windows NT 3.51 to assign the RAW datatype, regardless of the control file contents, do the following:
WARNING: Using Registry Editor incorrectly can cause serious, system-wide problems that may require you to reinstall Windows NT to correct them. Microsoft cannot guarantee that any problems resulting from the use of Registry Editor can be solved. Use this tool at your own risk.
\SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters
Value Name: SimulatePassThrough Data Type: REG_DWORD Data: 1
NOTE: The default value is 0, which informs LPD to assign datatypes according to the control commands.
net stop lpdsvc
net start lpdsvc
MORE INFORMATION: The Windows NT LPD Service follows the RFC1179 specification. This states that the LPR client must tell the LPD server how to handle the print job. If the client formats the job, it must send the "l" control character to instruct the LPD server to print the job without any alteration.
Some LPR clients cannot be configured to send different control characters and always send an "f". This control character instructs Windows NT to assign a data type of TEXT and to use the printer driver to create a new print job that prints the text of the original job on the page. In the case of a postscript job, the new print job prints the original job's PostScript code on the page.
For additional information, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q124735
TITLE: How Windows NT LPD Server Implements
LPR Control Characters
ARTICLE-ID: Q132460
TITLE: Troubleshooting Windows NT Print Server
Alteration of Print Jobs
Problem Four : Blank Pages From NT 3.5 