solution Contentsolution Content

HP LaserJet and OfficeJet - How to create a PRN file

Introduction

A .prn file, also known as “Print to File”, is a file which contains the print driver commands used to create a print job. This file is useful for support and engineering personnel to troubleshoot the root cause of a print issue.

Obtain a PRN file

Step one: Open the printer properties

  • For Windows 7 operating systems or earlier versions
  1. Depending on your Windows operating system, click Start, and then do one of the following to open the printer properties:
    • Click Devices and Printers or Printers and Faxes.
    • Click Control Panel, click Hardware and Sound, and then click Printers.
    • Click Control Panel, click Printers and Other Hardware, and then click Printers and Faxes.
    • Click Settings, and then click Printers and Faxes.
  2. Right-click the printer you want to use to create a .prn file, and then click Printer properties or Properties.
  • For Windows 8/ 8.1 operating systems
  1. Right-click the lower-left corner of the computer screen.
  2. Click Control Panel.
  3. Click View devices or printers or Devices and Printers.
  4. Right-click the printer you want to use to create a .prn file, and then click Printer properties.
  • For Windows 10 operating systems
  1. Right-click on the Windows icon in the bottom-left corner of the computer screen.
  2. Click Control Panel, and then click View Devices and printers.
  3. Right-click the printer you want to use to create a .prn file, and then click Printer properties.

Step two: Create a new port or Print to a File port

After opening the Printer properties, use one of the following methods to create a .prn file:

Method one: Create a new port

Follow these steps to create a new port:
  1. Click the Ports tab and note the current Port and Description. You will need to know the port when printing from the computer.
  2. Click Add Port.
  3. On the Printer Ports window, select Local Port, and then click New Port.
    Figure : Printer Ports
  4. In the Port Name window, type the full path for the local port (C:\capturePort.prn, for example), and then click OK.
    Figure : Port Name
  5. Close the Printer Ports window, click Apply, and then click OK.
    The port created in the port list box should have a check mark.
  6. Open the file which had an issue in printing, select File, select Print, and then click Print .
    note:
    The print job is sent to a file with a .prn extension from your application, rather than to the printer.
    The .prn file will be stored in the specified Port Name location (C:\ capturePort.prn, for example) and will include the driver commands.
  7. Send the .prn file to the HP agent as an email attachment.
  8. After generating a .prn file, change the port settings to the previous settings (noted in step 1) on the Ports tab in the Printer properties or Properties window.

Method two: Print to a File port

Follow these steps to print to a File port:
  1. Click the Ports tab.
  2. In the ports list box, make sure to note the current Port and Description. You will need to know this when printing from a computer.
  3. In the ports list box, select the File: Print to File check box.
    Figure : File: Print to File
  4. Click Apply, and then click OK.
  5. Open the file which had an issue in printing, select File, select Print, and then click Print .
    note:
    The print job is sent to a file with a .prn extension from your application, rather than to the printer.
  6. In the Output File Name text box, type a location, and a name for the file and include the .prn extension at the end of the file name (C:\ capture.prn, for example), and then click OK.
    -or-
    In the Print to file window, type a name for the .prn file, note the location where the file is saved, and then click OK.
    The .prn file will be stored in the location specified above and will include the driver commands.
  7. Send the .prn file to the HP agent as an email attachment.
  8. After generating a .prn file, change the port settings to the previous settings (noted in step 2) on the Ports tab in the Printer properties or Properties window.

Applicable Printers

This document applies to the following printers:
  • HP Color LaserJet printers
  • HP Color LaserJet Enterprise printers
  • HP LaserJet printers
  • HP LaserJet Enterprise printers
  • HP OfficeJet printers
  • HP OfficeJet Enterprise Color printers