Kate
Kate

Reputation: 945

How can I check if a printer is physically connected into my PC?

I am new to C# and I am using windows forms.

I built an EPOS application where it prints receipt if the printer is connected to my PC via USB port. The problem is if the printer is not physically connected then the document will be pending (as shown in the screenshot).

enter image description here

My question:

How can I check if the printer is physically connected (plugged) into my PC?

I already seen those questions 1 and 2 and the answers are not helpful because non of them mentioned how to check if the printer is physically connected but they only list all the printers names and some other information.

Anyone knows how to do that? Please help. Thank you

Upvotes: 3

Views: 1479

Answers (2)

Xaqron
Xaqron

Reputation: 30837

check PrintQueue.IsOffline Property

Upvotes: 2

Anakin Skywalker
Anakin Skywalker

Reputation: 35

The only way to know if a printer is physically connected to your PC is by physically checking the connection. This isn't a Pun, its an actual answer...

Upvotes: 1

Related Questions