Unsolved

This post is more than 5 years old

31 Posts

5729

December 4th, 2003 11:00

Redirect DOS Program Printout to Printfile

I have an old engineering program that runs under DOS. It runs fine on my W98 and my W2K machines. However the program only offers "Print", and that seems to send the printout to LPT1 and to the attached printer. There are no Print or Print Setup options in the program. I would like to print to file. I have read that most DOS programs bypass the Windows Print Manager. How can I redirect the program printout from LPT1 to a file. The output is just table s of text and numbers. I was wondering if the answer lay in running in DOS mode not just in a DOS window. Thanks.

December 4th, 2003 12:00

Frank,
Not sure if this will help but the option for printing to file is available within the printer configuration.
Control Panel, open printers, right click on your printer, select properties and then Details tab. On my system there is a "Print to" option with a pull down menu and one of the choices is "Print to file". Running your program in a DOS window may allow this option to be active.

There is a DOS command to do this, which I found on the HP printer help boards when trying to troubleshoot a dead LPT1 port.
Maybe someone else here will remember....

31 Posts

December 4th, 2003 15:00

Thanks for the help. I found a small dos utility called prn2file. It interecepts the data going to LPT1 and allows me to send it to the path and filename of my choice. I have to run the DOS program in real DOS, not a DOS window. It works fine on W98 but I have not checked it on W2K yet.
No Events found!

Top