Printing to LPTx.yyy or COMx.yyy From Windows 3.0Last reviewed: November 23, 1994Article ID: Q66070 |
The information in this article applies to:
SUMMARYWhen you print to LPTx.yyy, COMx.yyy (where "yyy" is any extension), or print to a file and subsequently copy the file to a port, the print job may be truncated. This problem occurs primarily when you are printing graphics. To work around this problem, you must either print to a port without an extension or copy the file to the port with the /b (binary) parameter when you print to a file. NOTE: This information does not apply to later versions of Windows.
MORE INFORMATIONWhen you print to a port with an extension, Windows writes the output to a file called LPTx.yyy or COMx.yyy. Since LPT and COM are reserved words for Microsoft MS-DOS, when Windows writes to a file called LPTx.yyy or COMx.yyy, MS-DOS redirects the output to the LPTx or COMx port. You can achieve the same functionality manually by printing to a file (that is, a port called FILE) and then copying the file to LPTx or COMx. The truncation problem occurs when one of the characters in the document formatting code or a graphic contains the ^Z (CTRL+Z) character. Because this character is the end-of-file marker for text files, the print job ends when the ^Z character is encountered. You can workaround this problem by copying the file to the port with the /b parameter as in the following example:
COPY FILENAME.PRN LPT1: /bThe /b option lets the COPY command know the file is a binary file. The LPTx.yyy port option in Windows does not invoke the /b parameter. Printing graphics using this parameter may cause the print job to be truncated. To print graphics when you have a hardware problem that Windows is detecting, print to a file, then copy the file to the printer using MS-DOS with the /b switch. The steps below outline this procedure.
|
KBCategory: kbprint
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |