What is a PRN file?

A PRN file is a special type of file which contains instructions for a printer, it tells the printer what to print on the page and where as well as which paper tray to use, what the paper size is and a number of other controls.

PRN files are usually created automatically by a printer driver, in fact this is the primary purpose of the printer driver, to translate the generic output from an application such as Word or Notepad into something the printer can understand and interpret.

Normally this whole process of creating the PRN file is transparent, you print a document in your favourite application and the paper starts feeding through the printer. There can however be some uses for intercepting and capturing a PRN file before it gets to the printer. Having the PRN file allows you to reprint the document without running or even having the original application that created the file, for instance if you run a print shop with a wide format plotter and your customers use AutoCAD to produce plots you can have them send a raw PRN file and output using that without needing AutoCAD.

There are two main formats of PRN file and a huge number of bespoke formats for mainly inkjet printers. The two formats we will look at are PostScript and PCL.

PostScript is described as a page description language and was developed by Adobe in 1984 and continues to be used on high volume printers, typesetting equipment and optionally on many mid size devices. It also had a brief foray into use as a display language on the Next systems. PostScript is a fully-fledged programming language and offers and extraordinary level of flexibility in the printing process. PostScript files can be easily converted to PDF files using Adobe Acrobat or even viewed using tools like GhostScript.

Hewlett Packard created PCL (Printer Command Language) for its first laser printer the original HP LaserJet again in 1984. PCL is a much simpler format than PostScript and in its early versions offered much better performance than PostScript but less functionality. Over time the format has developed substantially and PCL offers most of the functionality of PostScript, certainly enough for the typical office printing requirements. PCL is supported on virtually all laser printers with the exception of some very low volume devices. The current version of PCL is PCL6 although PCL5e is still used extensively. PCL files can be viewed using 3rd party software.

Finally there are a number of other PRN file formats most of them specific to certain types of printers such as low volume ink jet devices or old style dot matrix printers.

Capturing a PRN file is quite straight forward, most applications offer a "Print to file" option when you open the normal print dialog, this image shows the print dialog from word for instance:

Word Print to file

If your application doesn't support the "Print to file" option then you could create a printer which uses the FILE: port or even use some software such as Print Distributor which offers a very flexible solution for capturing print files.

To print a captured print file you can send it on to a print queue at the command prompt, just use the command:

Copy filename.prn \\computername\printersharename

This assumes you have shared your printer.