PRINTING .PRN FILES IN
WIN9X
If you use software that creates .prn files for printing later
(e.g., as part of a batch job), it's useful to know how to print them
manually from a command prompt. Typically, programs that print to a file
via a Printer Control Language (PCL) driver create .prn files. Programs
that print toa file using a Postscript (PS) driver create .ps files.
First:
1. Open a Command Prompt session via the Start Menu or click
Start |Run.
2. Type command.
3. Click OK.
Next, to print the file, type the following command, where
filename.ext is the name of the file to be printed (include a path if
needed) and LPTn is the number of the LPT port to print to (e.g., LPT1).
The /b switch denotes that the file being printed is a binary file. It
interprets control codes within the file differently to ensure that the
file is printed properly.
copy
filename.ext lptn /b
We learned how to manually print .prn. Now we look at a way to
enable drag-and-drop printing of these files in Windows
9x.
First, open Windows Notepad and create a new text file in the
\windows folder named printer.bat. This file should have one
line:
copy %1 lpt1 /b
This
line takes a variable In (%1) and copies it to lpt1 (you can also change
this to a different lpt port) with the /b switch to denote that it is a
binary file. Next, follow these steps:
1.
Click Start | Programs | Windows Explorer | View Menu |
Options.
2. Click New Type in the File Types tab.
3. Type Printer in the Description Of Type
field.
4. Type prn in the Associated Extension
field.
5. Click New.
6. Type print in the Action field.
7. Type c:\windows\printer.bat in the Application Used To
Perform Action field.
8. Click OK and then click Set Default.
9. Navigate (in Explorer) to the printer.bat file in
c:\windows.
10. Right-click on the file and select
Properties.
11. Click the Program tab, select the Close On Exit check box,
and click OK.
Finally, create a shortcut on the desktop to
c:\windows\printer.bat by right-clicking on printer.bat and then clicking
Send To | Desktop (create shortcut).
Once you have done this, you can drag a .prn file onto the
printer shortcut icon, right-click on a .prn file, and select Print from
the context menu or double-click the .prn
file.