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

Jammy Lee
  • 121

3 Answers3

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.

harrymc
  • 498,455
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.

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 "".

mael'
  • 1,946
Cilas
  • 1