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

心不动则不痛 提交于 2020-01-24 00:31:11

问题


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

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


回答1:


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.



来源:https://stackoverflow.com/questions/14836627/pagesprinted-field-of-job-info-2-not-reliable-for-hp-printers-on-windows-7-valu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!