带 USB 打印机的 DOS 旧版应用程序

发布于 2024-08-07 17:25:02 字数 1007 浏览 17 评论 0原文

我有一项不幸的任务,即对 DBIII+/Clipper '87 中开发的两个遗留应用程序进行(最少的)维护工作。

我可以完全访问源代码和最小的工具链,以便在需要时重新编译应用程序,但由于主要用户的各种(主要是心理)原因,我不被允许从头开始重新实现它。

无论如何,虽然应用程序在 XP 下运行良好,但硬件支持却变得很麻烦。用户需要更换出现故障的打印机(具有并行接口的老式 HP 打印机)和托管应用程序的 486 (!) 桌面。

现在的主要问题是找到一台可以在 XP 下使用的打印机,可能通过 USB(华硕 EEE Box 是完美的,并且它不支持并行端口)并使其对 DOS 应用程序“可见”。

到目前为止,我找到了解决方法:

链接

以及一些实用程序:

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

这些实用程序似乎更好,因为它们提供某种针对旧转义序列的过滤器(例如 Epson 的 ESC/P 或 HP 方言),使其对打印机透明。 至少他们是这么说的。

所以问题是:有没有人有过在 XP 下将旧 DOS 程序与现代打印机连接的经验?有什么注意事项吗?您是否使用了列出的实用程序之一(或我尚未找到的另一种实用程序),如果是,您会推荐哪一个?

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:

Link

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌梦深 2024-08-14 17:25:02

我们通常会完全按照您的链接之一提到的进行操作。也就是说,在 Windows 下将打印机安装在它想要安装的任何端口上(即:USB 等)。

接下来,共享打印机(假设工作站名为 COMPUTER1,您的共享为 HPPRINTER)。

接下来创建一个批处理文件来启动应用程序,它应该如下所示:

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

在您的应用程序中将输出设置为 LPT1。

还有其他更复杂的解决方案,但这是迄今为止最简单的解决方案。我们仍然有一个多年前构建的 DOS 应用程序,我们仍在积极营销和销售它。这就是我们处理打印的方式。它运作得很好。您还可以获得额外的好处,即现在使用 Windows 对打印作业进行排队,以便您可以暂停打印机队列等。打印机甚至可以关闭或缺纸,而作业仍然在 Windows 后台处理程序中排队。

注意:这假设新打印机将支持输出。如果它是“较旧”的 HP LaserJet,那么它可能是 PCL5,只需找到支持 PCL5 的设备即可。

在过滤方面,不确定为什么需要这个。只要输出是 PCL 或 Postscript 或其他一些标准,那么您仍然应该能够找到支持该打印描述语言的打印机。如果您有疑虑,只需添加有关当前设备的评论,我可以在我们每天处理此问题时提供有关兼容性的想法。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文