Click Settings>Control Panel >Printers and Faxes, or click on Devices and Printers.
Right-click on the print queue (for example: UPD v2 PCL5 driver).
Click on Properties or Printer Properties from the drop-down menu.
Go to the Ports tab, and click on "Add Port..." button. A Printer Ports dialog will appear.
Select Local Port, then click on New Port...
Enter the Port Name in the specified location (for example: d:\test.prn), click OK, and then close the Printer Ports window.
Click Apply, and then OK.
Open the test file and print the document using the modified print queue.
Note: The actual job file is generated in d:\test.prn, which was created in the Printer Ports window.