DOS Printing


Thread Starter

Bob Lockert

I have a number of programming packages that reguire DOS as an operating system. Generally, they can be made to function within a DOS window with newer operating systems (9X/NT etc.)

Unfortunately, during some recent housecleaning I delegated my last DOS printers to the dumpster. I'm left with networked printers (NT 4.0 workstations) that DOS windows cannot see.

I need to print ladder programs, and listings etc. from applications that expect a parallel port. Short of reinvesting in an old printer, what options exist?


Bob Lockert
Most of the older programs have the option of printing to a file, right? Try printing your ladder to a file and then import the file to any current word processor, MS Word for example. From there format everything into some font with fixed width spacing, like Courier New. You can also use find and replace to clean up some of the ladder and non-printable characters.

[email protected]
If the programs print text-based data, you can usually assign a network printer temporarily to a logical LPT port using the NET USE command in Windows NT or 2000 Pro. For example:

NET USE LPT1: \\computername\printername

Anything printed to LPT1: should go to the network printer you assigned. To turn it off:

NET USE LPT1: /delete

Another possibility is to 'add printer' to your printer folder using 'FILE: Print to file' as the printer port. Then select 'Generic / Text Only' as the printer type, select it as the default printer and when you print, it should ask for a filename and print the text there.

Good luck...jf

Alan Hartwell

If you are connected to a typical networked Windows system try the NET command from the command prompt. Among other things, it allows older 16-bit programs to print with newer versions of Windows.

The devicename in your case would typically be LPT1 so the command might be as simple as:


You would need to insert your server name and printer name.

Steve Myres, PE

There was a DOS program that we used to use for cleaning up text mode ladder output. IIRC, it was called Page Garden, and I think it was from a guy named Dan Bricklin. Worked pretty good.

david mertens


Windows 95 has the possibility to capture a printer port (e.g. LPT1). Anything printed to that port will be automatically redirected to the selected printer. This can even be a network printer. I have never tried this with windows NT,
but it works with most DOS programs under Windows 95.
In Win 98 printers menu there is a option to capture LPT1, from there I have printed DOS programs.

Mark Blunier

From your dos shell, enter the command
net use lpt1 \\<yourprinterserver>\<yourprintername>

Mark Blunier
Any opinions expressed in this message are not necessarily those of the company.
You can use Windows Nt function "Net Use" to redirect your Lpt1 to a networked printer.

For example:

If your printer-server is called "printserv1" and your printername is "printer1" then use the following syntax.

NET USE LPT1: \\sscfil01\printer1 /PER:YES

Make a .bat file and add your command line and run the bat file when you want to print to lpt1 from a dos program.

After that you can run the following command to delete the connection


Roy Henderson

I have had some success printing from DOS based control configuration programs by using the NET USE command to redirect LPT1: to a network printer. Type NET HELP USE at a command line for instructions. You may have to manualy change the printers default font set to something like "courier" to get the printout to line up.

Good Luck


IIRC ( which I often don't...) When you define the network printer in windows, there is a check box that you can mark to make to printer
recognizeable to DOS. Windows will capture and re-direct output sent to LPT1 out to the *one* printer that you designate during setup.

This was true in windows 90-something anyway. I believe it to be true of others...
How would I go about doing this in Win 98. I tried this and it doesn't recognize persistent connections.

If you can identify your nearest network printer by server and printer name then just print as you would to a file. I.e to direct directory contents to the network printer HPQ28 on say server NTS1 then type at the command line dir > \\NTS1\HPQ28 . Easy. The same principle applies an most other programming lanquages.