在linux上捕获虚拟打印机输出

时间:2022-11-21 13:56:06

I'm writing a Java screen-scraping application for a 3270 mainframe and rather than scroll through page after page of 80x24 chars I'd like to output all pages to a printer and then capture and parse the printer output.

我正在为3270主机编写一个Java屏幕抓取应用程序,而不是逐页滚动浏览80x24字符的页面我想将所有页面输出到打印机,然后捕获并解析打印机输出。

The 3270 client has a print option, so I just need to virtualise a printer device and then somehow capture the output. Has anyone achieved this in Linux before?

3270客户端有一个打印选项,所以我只需要虚拟化打印机设备,然后以某种方式捕获输出。有没有人在Linux之前实现这一点?

2 个解决方案

#1


0  

You probably want to create a lpd-queue for this purpose and then hook into that.

您可能希望为此目的创建一个lpd队列,然后挂钩。

#2


0  

If this is 3270 via VT100 you can issue VT100 print capture commands at the terminal. Otherwise, as already answered you can enable LPD and put a filter on it to tee it to a file.

如果这是通过VT100的3270,您可以在终端发出VT100打印捕获命令。否则,正如已经回答的那样,您可以启用LPD并在其上放置一个过滤器以将其发送到文件。

#1


0  

You probably want to create a lpd-queue for this purpose and then hook into that.

您可能希望为此目的创建一个lpd队列,然后挂钩。

#2


0  

If this is 3270 via VT100 you can issue VT100 print capture commands at the terminal. Otherwise, as already answered you can enable LPD and put a filter on it to tee it to a file.

如果这是通过VT100的3270,您可以在终端发出VT100打印捕获命令。否则,正如已经回答的那样,您可以启用LPD并在其上放置一个过滤器以将其发送到文件。