中PrintJob WMI类有很多的属性。 (参见: Win32_PrintJob MSDN上)
The Win32_PrintJob WMI class has lots of properties. (see: Win32_PrintJob on MSDN)
我有两极的打印作业和显示作业的信息一小.NET应用程序。
I have a small .NET application that poles the printing jobs and displays the jobs' information.
在总页数属性格式给出的页面发送量。但这个数字并没有考虑到用户请求的份数。因此,如果用户想打印5份两页的文件,总页数的值将是2,而不是10。
The TotalPages propery gives the amount of pages sent. But that figure DOESN'T take into account the number of copies requested by the user. So, if a user wants to print 5 copies of a two page document, the value of TotalPages will be 2, not 10.
我怎样才能副本用于印刷作业的数量,或得到的页的总金额将被打印(次拷贝页中的作业号数)?
How can i get the number of copies for a printing job, or get the total amount of pages to be printed (number of copies times number of pages in the job)?
感谢
推荐答案我有同样的问题,Win32_PrintJob(总页数/ PagesPrinted没有考虑到副本的帐号)。我通过WMI与Win API相结合的解决了这个问题。
i had the same problem with Win32_PrintJob (TotalPages/PagesPrinted doesn't take into account number of copies). I solved it by combining WMI with Win api.
从的 DEVMODE 的结构(dmCopies),这是 JOB_INFO_2 结构。
Number of copies can be retrieved from DEVMODE structure (dmCopies) which is part of JOB_INFO_2 structure.
所以,你叫GetJob与级别= 2,你会得到JOB_INFO_2实例。从那里,这是小菜一碟,编组只是点点:)
So you call GetJob with Level=2 and you will get JOB_INFO_2 instance. From there, it's piece of cake, just little bit of marshaling :).
希望这有助于。
干杯,
卢卡斯
更多推荐
获得的页的总数量从Win32
发布评论