HP/Works

Home Join! Events PING! Committee Directory

Go to: PING INDEX : DECEMBER 1997 CONTENTS : HINTS AND TIPS

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
  1. Go to the Windows NT box and install Microsoft TCPIP printing service from Control Panel/Network Icon and reboot the server.
  2. On the NT box make sure and edit the \winnt\system32\drivers\etc\hosts file to include the hostname and ip address of the UNIX box.
  3. Go to Control Panel/Printers Icon and create a printer if you don't have one already available. Note the name that you use for this printer.
  4. Start the LPDSVC by doing the command: NET START LPDSVC This service may not be automatically started after installation. To autostart this at every boot go to Control Panel/Services Icon and look for TCPIP Print Server. Change it to automatic instead of manual mode.
  5. On the UNIX box, edit /etc/hosts file & add the NT hostname and IP address.

    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.

  6. On the HP-UX box run SAM and go to the LP SPOOLER section/Printers and Plotters. Create a remote printer and fill in the following fields:
    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
  7. Try doing a test printer to the new ntprinter queue by doing:
    
    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.

  8. You may not have proper formatting of print jobs once they get to the NT print spooler.

    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.

    1. Run Registry Editor (REGEDT32.EXE)
    2. From the HKEY_LOCAL_MACHINE subtree, go to the following key:
      
      \SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters
    3. On the Edit menu, click Add Value
    4. Add the following:
      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.

    1. Run Registry Editor (REGEDT32.EXE)
    2. From the HKEY_LOCAL_MACHINE subtree, go to the following key:
      \SYSTEM\CurrentControlSet\Services\LPDSVC\Parameters
    3. On the Edit menu, click Add Value
    4. Add the following:
      
      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.

    5. To work around the problem mentioned above, create an LPD key at the same level of the LPDSVC key.
    6. Click the LPDSVC Key, click Save Key from the Registry menu, and then save the file as LPDSVC.KEY.
    7. Click the LPD key created in step 5.
    8. Click Restore on the Registry menu, click the file created in step 6, and then click OK.
    9. A warning message appears. Click OK and then quit Registry Editor.
    10. At a command prompt, type:
      net stop lpdsvc
    11. At a command prompt, type:
      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


Home