Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have two method
Method1 which is rebooting the printer .

Method2 with will print the barcode.

i am using thread sleep beforecalling method2 but in some printer take some more time so it will fail.
Is there are any way to know real time status of printer so that i can call Method2


Thanks ,

What I have tried:

Quote:
Is there are any way to know real time status of printer so that i can call Method2
Posted
Comments
Mehdi Gholam 15-Oct-17 9:55am    
Restarting a printer is a infrequent event, just wait.
Siddharth Rai 15-Oct-17 10:02am    
i am wating with Thread.Sleep(xxxx) but i want to sure about real time printer status before calling mrthod2
Mehdi Gholam 15-Oct-17 10:06am    
The printer driver will queue the documents and give an error if it is offline and retry any way.
Richard MacCutchan 15-Oct-17 10:42am    
Unless you are directly connected to the printer it is not easy to tell. But see printer status C# - Google Search[^].
GKP1992 16-Oct-17 7:08am    
Have you considered using async and await?

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