票据印刷工作

发布于 2024-12-01 05:57:00 字数 370 浏览 7 评论 0原文

我正在寻找一种方法来连接机器上的所有打印作业。

我们有一些运行 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 技术交流群。

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

发布评论

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

评论(1

森林迷了鹿 2024-12-08 05:57:00

您可以使用 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, call Resume to actually print the file.

See Example: Receiving Event Notifications Through WMI for a C++ example which handles WMI notifications.

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