打印作业接受和路由软件 [英] Print Job Accepting and routing Software

查看:63
本文介绍了打印作业接受和路由软件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个软件,它可以接受来自其他计算机的打印作业,然后将这些打印作业路由到连接了打印机的 LAN 上的 PC.

这将如何发生 ->1- 当名为虚拟打印机"的软件安装在计算机X"上时,Windows 应该认为它是该计算机的打印驱动程序/附加打印机.2-然后该PC的管理员转到Windows中的设备和打印机"并选择虚拟打印机",右键单击并查看属性并选中共享这台打印机"复选框3- 现在局域网上的其他PC可以看到在连接到计算机X"的局域网中有一个名为Virtual printer"的共享打印机4- 因此,他们可以在需要打印内容时通过选择虚拟打印机"将打印作业发送到此虚拟打印机".

我如何编写这个程序(可能是 c#)以将其自身显示为 Windows 的打印机,然后接受传入的打印作业并将它们发送到连接了打印机的所需计算机.

我不知道如何编码这个东西,我也没有知识,请帮助我提供一些资源、代码或示例项目或至少与此类似的示例.谢谢

解决方案

根据你最初的问题回顾我的第一个答案,我不再明白为什么我如此强调"转换传入作业到图像"-stage.可能是因为您在其中一个答案中提到您想要一个类似于 imageprinter 的功能.>

无论如何,既然您现在明确表示您的主要目标是将所有传入的作业转发到其他计算机(安装了真正的打印机)——这也可以通过以下方式实现:

  • 带有 PostScript 驱动程序的打印队列
  • 幽灵脚本
  • RedMon 作为打印队列的端口监视器
  • DOS 批处理脚本

现在的区别是双重的:

  1. 现在您没有以将传入的 PostScript 转换为图像格式的方式设置 RedMon/Ghostscript.
  2. 现在您设置 RedMon 以通过远程计算机"(包括真实驱动程序)上的真实目标队列sharedprintername"路由作业的方式运行 Ghostscript.

Ghostscript 命令类似于:

 gswin32c.exe ^-dNOPAUSE ^-dBATCH ^-d安静^-sDEVICE=mswinpr2 ^-dNoCancel ^-sOutputFile="%%printer%%\\remotecomputer\sharedprintername" ^- ### <-- 注意这个-"!

I want to create a software which can accept Print Jobs from other computers, and then route those print jobs to PCs on LAN with printers attached.

How it's going to happen -> 1- When that software called "Virtual Printer" is installed on a computer "X", Windows should think that it is a print driver/attached printer to that computer. 2- Then administrator of that PC goes to "Devices and Printers" in windows and select the "Virtual Printer", right click and view properties and select the check box "Share this printer" 3- Now other PCs on the LAN can see that there is a shared printer call "Virtual printer" in the LAN connected to the computer "X" 4- So they can send print jobs to this "Virtual Printer", by selecting "Virtual Printer" when they need to print something.

How can I write this program (possibly c#) to Appear itself as a printer to the Windows, and then Accept incoming print jobs and send them to desired computers with printers attached.

I don't have any idea how to code this thing, and I don't have knowledge either, please help me with some resources, codes or sample projects or at least samples similar to this. Thanks

解决方案

Looking back at my first answer in the light of your original question, I do no longer understand why I put so much emphasize on a "convert incoming job to an image"-stage. Probably because you had mentioned in one of your answers that you wanted a functionality similar to imageprinter.

Anyway, since you now made clear that your main goal is to forward all incoming jobs to other computers (which have the real printers installed) -- this can also be achieved with:

  • a print queue with a PostScript driver
  • Ghostscript
  • RedMon as port monitor for the print queue
  • a DOS batch script

The difference now is twofold:

  1. now you don't setup RedMon/Ghostscript in a way that converts incoming PostScript to an image format.
  2. now you setup RedMon to run Ghostscript in a way that routes the job through the real target queue 'sharedprintername' at 'remotecomputer' (including real driver).

The Ghostscript command would be similar to:

  gswin32c.exe ^
   -dNOPAUSE ^
   -dBATCH ^
   -dQUIET ^
   -sDEVICE=mswinpr2 ^
   -dNoCancel ^
   -sOutputFile="%%printer%%\\remotecomputer\sharedprintername" ^
   -        ### <-- note this '-' !

这篇关于打印作业接受和路由软件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆