C# Network Printing

Posted by tanthiamhuat on Stack Overflow See other posts from Stack Overflow or by tanthiamhuat
Published on 2010-05-06T06:50:28Z Indexed on 2010/05/06 6:58 UTC
Read the original article Hit count: 244

Filed under:
|
|

I am able to get the list of network printers via this code:

private void Form1_Load(object sender, EventArgs e)
{
  foreach (String printer in PrinterSettings.InstalledPrinters)
  {
    listBox1.Items.Add(printer.ToString());
  }
}

For each network printer, I want to extract out more information like: (a) get document information, like number of pages printed, filename, file-size, etc.

(b) get computer IP address from which document was printed.

(c) get username of who printed the document.

How do I achieve the above? any code samples would be appreciated. Do I have to look into Windows Management Instrumentation(WMI) stuffs?

© Stack Overflow or respective owner

Related posts about c#

Related posts about network