LPD Server Adds and Prints Control Codes

Last reviewed: March 9, 1998
Article ID: Q150930
The information in this article applies to:
  • Microsoft Windows NT Workstation versions 3.5, 3.51, and 4.0
  • Microsoft Windows NT Server versions 3.5, 3.51, and 4.0

SYMPTOMS

When a formatted job prints from a line printer remote (LPR) client to a Windows NT computer that is running the Line Printing Demon (LPD) services, PCL or PostScript codes are printed instead of a properly formatted document.

RESOLUTION

The LPD service can be reconfigured to ignore the format control command from the LPR client and always assign the RAW datatype. Use one of the appropriate sections below to reconfigure the LPD service.

NOTE: This setting is not available for a single printer. This setting affects all printers on the Windows NT Server that are receiving print jobs from LPR clients. Print jobs from non-LPR clients are not affected by this setting.

Configuring SimulatePassThrough In Windows NT 4.0

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


Additional query words: prodnt unix aix sun solaris
Keywords : ntprint NTSrvWkst kbnetwork kbprint
Version : 3.5 3.51 4.0
Platform : winnt


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 9, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.