对于Windows 7上的hp打印机,job_info_2的PagesPrinted字段不可靠,值取决于打印处理器 [英] PagesPrinted field of job_info_2 not reliable for hp printers on windows 7, value depends on print processor

查看:107
本文介绍了对于Windows 7上的hp打印机,job_info_2的PagesPrinted字段不可靠,值取决于打印处理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

job_info_2的PagesPrinted字段对于Windows 7上的hp打印机不可靠,值取决于打印处理器

PagesPrinted field of job_info_2 not reliable for hp printers on windows 7, value depends on print processor

我正在开发打印监视器,对于hp打印机的PagesPrinted是不可靠et的值错误

I'm developping a print monitor, and for hp printer PagesPrinted is not reliable et has wrong values

推荐答案

您的打印机的打印驱动程序显然在调用SetJob时使用了错误的页数值。您可能对此无能为力。因此,获得准确页数的唯一方法是解析打印数据流并自己计算页数。有问题的打印机使用PCL。幸运的是,sourceforge提供了一个开源的 PCL查看器,您可以使用它来解析PCL。尽管此解决方案比简单地调用GetJob更为复杂,但它对于所有PCL打印机都应该可靠地工作。支持Postscript的打印机可以用类似的方式完成,并且由于Postscript将页数直接放入数据流中,因此解析更加简单。

The print driver for your printer is apparently calling SetJob with incorrect page count values. There's probably nothing you can do about that. Therefore, the only way to get an accurate page count is to parse the print data stream and count the pages yourself. The printer in question uses PCL. Fortunately, there is an open source PCL viewer available from sourceforge, which you can use to parse the PCL. Although this solution is more complex than simply calling GetJob, it should work reliably for all PCL printers. Supporting Postscript printers can be done in a similar manner, and the parsing is much simpler since Postscript puts the page count directly in the data stream.

这篇关于对于Windows 7上的hp打印机,job_info_2的PagesPrinted字段不可靠,值取决于打印处理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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