Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DOS legacy application with USB printer

I have the unfortunate task of doing (minimal) maintenance work on two legacy applications developed in DBIII+/Clipper '87.

I have full access to source and a minimal toolchain to recompile the application when needed, but I am not allowed to reimplement it from scratch due to various (mostly psychological) reasons from the main user.

Anyway, while the applications work fine under XP, hardware support is becoming a chore. The user needs to replace the failing printer (an old impact HP with parallel interface) and the 486 (!) desktop where the applications are hosted.

The main problem now is to find a printer which can be used under XP, possibly through USB (an Asus EEE Box would be perfect, and it does not sports a parallel port) and make it "visible" to the DOS applications.

So far I have found a workaround:

http://geekswithblogs.net/dtotzke/articles/26204.aspx

plus a few utilities:

http://www.dosprn.com/ http://www.dos2usb.com/index.htm http://www.printfil.com/english.htm

The utilities seem better because they offer some kind of filter for the old escape sequences (like ESC/P for Epson or the HP dialect) making this transparent to the printer. Or so they say, at least.

So the question is: has anyone some experience about interfacing old DOS programs with modern printers under XP? Any caveats? Did you use one of the listed utilities (or another one I didn't find yet) and if yes, which one would you reccomend?

like image 977
p.marino Avatar asked Oct 19 '09 09:10

p.marino


1 Answers

We typically do exactly what one of your links mentions. That is, install the printer under Windows on whatever port it wants to install itself on (ie: USB etc.).

Next, share the printer (let's say the workstation is called COMPUTER1 and your share is HPPRINTER).

Next create a batch file to launch the app, it should look something like this:

net use lpt1 /d
net use lpt1 \\COMPUTER1\HPPRINTER
<yourapp.exe>

In your app set the output to LPT1.

There are other, more complex solutions, but this is by far the simpliest. We still have a DOS app that was built years ago that we still actively market and sell. This is how we handle print. It works very well. You also get the added benefit of now using Windows to queue your print jobs so you can pause the printer queue etc. The printer can even be off or out of paper and the jobs still queue up in the Windows spooler.

Caveat: This assumes that the output will be supported by the new printer. If it's an 'older' HP LaserJet then it's probably PCL5, just find a device that supports PCL5 and away you go.

In terms of filtering, not sure why you'd need this. As long as the output is PCL or Postscript, or some other standard then you should still be able to find a printer that supports that print description language. If you have concerns just add comment regarding the current device and I can provide ideas as to compatability as we deal with this daily.

like image 138
Douglas Anderson Avatar answered Oct 03 '22 05:10

Douglas Anderson