Click here to Skip to main content
15,909,742 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello all
please i need to get all information about my connected printer over network using c# code
help me ...

printer name is my-printer
ipaddress 192.2.3.2 ( for example )

i want information such as printer level , paper status , toner level .. etc
Posted
Comments
[no name] 11-Apr-14 8:22am    
Okay.. and? Did you have some problem with the code that you have written that tries to get this information? Does your printer even support this information?
sam9787 11-Apr-14 8:27am    
i try this code "
bool online = false;
try
{
PrintDocument printDocument = new PrintDocument();
printDocument.PrinterSettings.PrinterName = "192.168.5.2";
online = printDocument.PrinterSettings.IsValid;
}
catch
{
online = false;
}
return online;
[no name] 11-Apr-14 9:29am    
Okay and exactly what is the problem with your code? Still does not answer the question whether you have researched whatever printer you have and see if it supports this type of operation. Why did you say in your posting that the printer name is "my-printer" but in your code you seem to think that your printer name is "192.168.5.2"?

1 solution

The API calls you will need are wrapped up in this component[^] and it is a fairly simple job to convert the code to C# if VB.NET doesn't suit your needs.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900