开发者

EnumJobs not returning Copies & Total Pages

I'm using Windows API's EnumJobs to find the PageCount and Copies of a print job, but I found that these fields are almost always zero when called on a print server.

Although it could be my timing is out, because the number of pages increment as the job prints and once it's done the print job cannot be accessed. So there is about half a nanosecond when the values in EnumJobs is correct before it dissapears.

I've been scouring the web but can't find any help on this, just other people with similar problems.

Anybody with experience with EnumJobs or can suggest other means of determining the total number of pages pri开发者_如何转开发nted?


Found it!!

On the client side, on devices and printers, right-click on any printer, and select printer properties, and click the Sharing tab. Tick off "Render print jobs on client computers". This will cause the events to fire on the server spool. If you're running server 2008 you can do this on the server as well and it will affect all client jobs.

To set programatically or for more info:

http://msdn.microsoft.com/en-us/library/ff556443.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜