jay gohel
jay gohel

Reputation: 39

fetch information from USB printers

I want to discover local printer (attached via USB) through any java or .net application. i need following information directly from the printer. 1. printer make and model 2. serial number 3. page count

I have tried SNMP API in java but it works for networked printer only. I am searching for any API or script that communicate with USB printer and provide me information.

till now, i have tried WMI queries but through these queries, I am not able to fetch page count and serial number values from USB printer.

Any help on this would be appreciated.

Upvotes: 1

Views: 1640

Answers (1)

Freelancer
Freelancer

Reputation: 9074

private void Form1_Load (object sender, System.EventArgs e)

{

foreach (String printer in PrinterSettings.InstalledPrinters)

{

printersList.Items.Add (printer.ToString());

}

}

Try the above code.Its in c# .net For more information visit url: http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/efaf11bf-f7ae-4167-ba0b-d495b0e21946

Upvotes: 0

Related Questions