如何在c ++ / vc ++中找不到为作业打印的页面 [英] How to find no of pages printed for a job in c++/vc++
本文介绍了如何在c ++ / vc ++中找不到为作业打印的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道通过使用c ++或vc ++编程给打印机的任务打印了多少页。
添加更多信息:
是我的程序发送的文件类型是DOC和PDF。打印后我需要记录该用户为该文件打印的页数数据。
有时我不会发送总文件,我会发送一些选择的页面或文本也是。
所有我想要的是在C ++ / VC ++中为该作业打印的页数。
坦克提前。
Hi,
I want to know how many pages printed for a task that is given to printer through programming using c++ or vc++.
Adding some more information:
yes the file types that my program sending are DOC and PDF. After printing i need to log the data in how many pages are printed for that file for that user.
Some time i will not send total file ,i will send some selected pages or text also.
All just i wanted is how many of pages printed for that job in C++/VC++.
Tanks in advance.
推荐答案
您可以订阅Windows打印假脱机程序通知功能,如FindFirstPrinterChangeNotification,FindNextPrinterChangeNotification,感兴趣的是JOB_NOTIFY_FIELD_TOTAL_PAGES,JOB_NOTIFY_FIELD_PAGES_PRINTED。或者,您可以使用Windows XP上的OpenEventLog或Vista及更高版本上的EvtSubscribe检查Windows日志中的相同信息。你可以从印刷过程中完成。
You can subscribe to Windows print spooler notification functions, as FindFirstPrinterChangeNotification, FindNextPrinterChangeNotification with interest of JOB_NOTIFY_FIELD_TOTAL_PAGES, JOB_NOTIFY_FIELD_PAGES_PRINTED. Or you can examine Windows logs for the same information, using OpenEventLog on Windows XP or EvtSubscribe on Vista and later. And you can do it from printing process.
这篇关于如何在c ++ / vc ++中找不到为作业打印的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文