2

There is a very old foxpro DOS program, which print doc via LPT1 , now user want to have soft copy . So I shared the PDF printer and OneNote printer on my local machine, and tried to map LPT1 to them as below

PDF printer:

net use LPT1: \\{my machine name}\pdf

Printer "Send to OneNote 2013":

net use LPT1: \\{my machine name}\one

Both commands completed successfully, and I can see the task could be added to printer's queue by below command, but nothing actually printed

print /d:LPT1 result.txt
=> result.txt is currently being printed

Note: I also tried LPT2, LPT3 , but got same result

3 Answers 3

1

There are sometimes problems redirecting LPT1 if a physical printer port exists on the computer. If that's your case, you could try the following:

  1. Disable LPT1 in the BIOS (if supported)
  2. Direct the old DOS program to use LPT2 (if it accepts such parameters) and redirect LPT2 instead
  3. Use the ancient command MODE LPT1:=LPT2: (probably too old to work in Windows 7) and redirect LPT2 instead

You could also try to run in a Command Prompt (cmd) as Administrator the following :

net use lpt1: /delete
net use lpt1: \\{my machine name}\{pdf-printer} /persistent:yes

If nothing works for you, here are a couple of shareware products that supposedly solve the problem (never tried them): DOS Printer, Printfil.

1
  • I also tried LPT2, LPT3 , but got same result , anyway , thanks for your reply, and I'll try the products that you shared
    – Jammy Lee
    Commented Apr 26, 2017 at 2:55
1

The main problem isn’t redirection. Windows printer drivers can’t handle the ASCII data streams with embedded print codes as sent by a DOS program. A DOS printer will render the data stream to paper. For all other print tasks, you need an external DOS-to-Windows print processor program (more around, even freeware). Or vDos, though that is primary intended to run DOS applications in Windows 64-bit, like most Windows 10 distributions nowadays.

2
  • thanks, would you give some names of "DOS-to-Windows print processor program" ?
    – Jammy Lee
    Commented May 26, 2017 at 8:39
  • Besides vDos built-in print processor, you can use: DOSPRN, DOSPrinter, WinPrint, and more, just Google. Though those are essentially Epson-only, so your DOS program has to be set to print to an Epson printer. Commented May 27, 2017 at 9:35
0

I had the same problem today; I found that if you are using the file's path without quotes "", it shows the is currently being printed message but nothing is actually printed. If the file's directory has blank spaces the command-line needs all of the file's path inside quotes "".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .