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?