DOS legacy application with USB printer

怎甘沉沦 提交于 2019-12-04 06:17:27

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!