views:

62

answers:

1

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 printed?

A: 

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

Hein du Plessis