Help and Support

How to Print .prn or .ps Files in Windows 95 or Windows 98

Article ID:158081
Last Review:January 19, 2007
Revision:2.1
This article was previously published under Q158081
If this article does not describe your hardware-related issue, please see the following Microsoft Web site to view more articles about hardware:
http://support.microsoft.com/default.aspx/w98?sid=460 (http://support.microsoft.com/?scid=http%3a%2f%2fsupport.microsoft.com%2fdefault.aspx%2fw98%3fsid%3d460)
On This Page

SUMMARY

This article describes how to print files that contain raw printer data (.prn or .ps files) in Windows. These files are created by printing from a program to a file by using a Printer Control Language (PCL) or PostScript printer driver. A .prn file is typically created by using a PCL printer driver, and a .ps file is typically created by using a PostScript printer driver.

Back to the top

MORE INFORMATION

How to Print from a Command Prompt

To print from a command prompt, type copy pathfile name.file name extension LPT port number /b, and then press ENTER, where:
path is the path to the folder that you want to use to store the file
file name is the name that you want to give the file that you are making
file name extension is the file name extension for the file that you are making
port number is the number of the printer port that your printer is using, typically LPT1
For example, if you want to make a file that is named Rawprint.txt, save this file to the desktop, and your printer is connected to LPT1, you would type copy c:\windows\desktop\rawprint.txt lpt1 /b at a command prompt, and then press ENTER.

Back to the top

How to Enable Drag-and-Drop Printing for .prn or .ps Files

To enable drag-and-drop printing for .prn or .ps files:
1.Use any text editor (such as Notepad) to create a file that is named Printer.bat.
2.Type copy %1 lptport number /b in the Printer.bat file, where port number is the number of the printer port that your printer is using. Note that the port is typically LPT1. For example, if your printer is connected to LPT1, you would type the following command:
copy %1 lpt1 /b
3.Save the file in the Windows folder.
4.Click Start, point to Programs, and then click Windows Explorer.
5.On the View menu, click Options.
6.On the File Types tab, click New Type.
7.In the Description Of Type box, type Printer.
8.In the Associated Extension box, type PRN or PS, depending on your printer driver, and then click New.
9.In the Action box, type print.
10.In the Application Used To Perform Action box, type c:\windows\printer.bat.
11.Click OK, and then click Set Default.
12.Use Windows Explorer to locate the Printer.bat file in the Windows folder.
13.Right-click the Printer.bat file, and then click Properties.
14.Click to select the Close On Exit check box on the Program tab, and then click OK.
15.Create a shortcut to the C:\Windows\Printer.bat file on the desktop. To do this, right-click the Printer.bat file in the Windows folder, point to Sent To, and then click Desktop (create shortcut).
NOTE: If you are printing to a network printer, you must redirect an LPT port to your network printer. For information about how to capture a port for your network printer, view the "To Capture a Printer Port" topic in Windows Help.

Back to the top

How to Print .prn or .ps Files After You Enable Drag-and-Drop Printing

IMPORTANT: For correct output, you must create the file by using the same printer type as the printer that you plan to use to print the file. For example, you must send a file that you created with a PCL printer driver to a PCL printer, and a file that you created with a PostScript printer driver must be sent to a PostScript printer.

To print .prn or .ps files after you enable drag-and-drop printing, use any of the following methods:
Drag a file onto a printer icon.
Drag a file onto the Printer.bat shortcut that you made on your desktop.
Right-click the file that you want to print, and then click Print.
Double-click the file.

Back to the top


APPLIES TO
Microsoft Windows 95
Microsoft Windows 98 Standard Edition
Microsoft Windows 98 Second Edition

Back to the top

Keywords: 
kbhowto kbprint KB158081

Back to the top

Article Translations

 

Related Support Centers

Other Support Options

  • Contact Microsoft
    Phone Numbers, Support Options and Pricing, Online Help, and more.
  • Customer Service
    For non-technical assistance with product purchases, subscriptions, online services, events, training courses, corporate sales, piracy issues, and more.
  • Newsgroups
    Pose a question to other users. Discussion groups and Forums about specific Microsoft products, technologies, and services.