Get information from printers

  • Thread starter Thread starter Mortel
  • Start date Start date
M

Mortel

Hi,

How I can get information from printer about count of copy pages, who's
print pages etc. I want monitoring printers and save that information to
file log. Maybe printer has any events to do that ?
Thank's for all.

Boniek
 
Boniek,

I think that the easiest way to do this would be to use the WMI classes
in the System.Management namespace. You can have an event raised when there
is a new print job created. You can use the ManagementEventWatcher class to
create your query, looking for instances of the Win32_PrintJob class.
Basically, you want to look for these events as well:

__InstanceCreationEvent
__InstanceOperationEvent
__InstanceDeletionEvent
__InstanceModificationEvent

The about page in the documentation of the ManagementEventWatcher class
has a sample that will show how you can monitor these events.

Hope this helps.
 
Back
Top