票据印刷工作
我正在寻找一种方法来连接机器上的所有打印作业。
我们有一些运行 Windows XP 的 Kiosk 计算机,我们希望允许客户进行打印。我们希望能够在打印作业发送到打印机时捕获它,对其进行分析,向用户显示一个包含打印价格的对话框,如果他批准,则将作业发送到打印机。
如果他不同意,这项工作就必须取消。
我的第一个想法是使用钩子。但是打印作业有钩子吗?它是如何使用的?
有人还提到了PCL(打印机命令语言),意思是我们为本地打印机驱动程序编写一个包装器。那有多困难?在哪里可以找到好的 PCL 教程?
PJL(打印机作业语言)怎么样?
目标语言是c++。
我们将不胜感激您的意见。
谢谢, 夏季灯泡
I'm looking for a way to hook up all printing jobs on a machine.
We have some Kiosk computers running windows XP, and we would like to allow customers to print. We would like to be able to catch the printing job, as it is sent to the printer, analyze it, show the user a dialog with the price for the printing and if he approves - send the job to the printer.
If he doesn't approve, the job must be canceled.
My first idea was to use a hook. But is there a hook for printing jobs? How is it used?
Someone also mentioned PCL (Printer Command Language), meaning us to write a wrapper for the local printer driver. How difficult is that? Where can i find a good tutorial for PCL?
What about PJL (Printer job language)?
The target language is c++.
Your input will be appreciated.
Thanks,
Summerbulb
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用 WMI 获取通知关于使用
Win32_PrintJob
。创建作业后,立即调用
Pause
暂停,显示您的 GUI。如果客户端接受该作业,请调用继续
以实际打印文件。请参阅示例:通过 WMI 接收事件通知 处理 WMI 通知的 C++ 示例。
You can use WMI to get notified about new printer jobs using
Win32_PrintJob
.As soon as the job is created, call
Pause
on it to suspend, show your GUI. If the client accepts the job, callResume
to actually print the file.See Example: Receiving Event Notifications Through WMI for a C++ example which handles WMI notifications.