Skip navigation

JSI Tip 0117 - Do you occassionally print to a file?

In Windows NT, you can configure a printer Port as File:. If your usage is infrequent, you may wish to always print to the same file each time, bypassing the dialogue box that requests a file name. To accomplish this, edit:

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Ports

and Add Value of type REG_SZ for your Drive:\Directory\FileName.Extension. Leave the string empty. Example: C:\prt2file.prn. Don't forget proper permissions.

Reboot and add a printer using the same driver, print processor, and data type as the printer that will actually render the output on paper. Select the above filename as the port.

You may wish to add a new file type for this extension in Explorer / View / Options / File Types / New Type. I defined prn file with extension prn. I clicked new and added a print action with the following Application ... string: C:\WINNT\system32\print.exe "%1". This allows me to double click to print to the default printer or drag the file to a desktop printer icon.

Hide comments


  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.