How to Print From a PRN File

When you print to a file the program outputs whatever it would have sent to the printer you have attached to your computer to a file instead. The idea is that later you might want to send this file to a similar printer on a different computer. So, the main use for a .PRN file is to copy it to a printer in order to get the output. You can open a .PRN file in any text editor but what you'll likely see is your text surrounded by a whole bunch of "junk" which represents all the various printer codes necessary to set margins, special spacing, graphics, etc.

Printing this file successfully requires a few assumptions:

For this example, we'll assume that the .PRN file is named OUTPUT.PRN and is located on a floppy disk in the A: drive. Substitute the proper path for whatever filename and drive you are using. Here are the steps...

Assuming the printers are the same and the output printer is the default device the file should now print. What you've basically done is to tell Windows to copy the output file to the default printer using a binary copy (i.e., don't add any carriage returns or line feeds and ignore all control codes; just passing them through as they are in the file).

If connected via USB...

If your printer is connected via USB then the above command needs to be modified as follows:

To get the Computer_Name open the Control Panel and select System. In the dialog that opens select the Computer Name tab. There you will find the name associated with the computer (ignore any periods after the name if there are any). To get the Printer_Share_Name open the Control Panel and select Printers and Faxes. Select the printer you need to print to and then the Share link in the left menu. If the printer has no share name then you will need to assign one.

Shortcut: Instead of the \\Computer_Name you can use \\127.0.0.1 (every computer's local network loopback address) but you still need the printer name information (tested and confirmed on Win2k and Server2003, thanks to Brad M).

Once you have both the Computer_Name and Printer_Share_Name insert these in the command above. Note the double backslash in front of the Computer_Name and the single backslash that is between the two.

[Note: If the printer is a network computer then you would substitute \\Print_Server_Name (the name of the print server on the network) for \\Computer_Name in the above. Thanks to Tim S.]