I'm fairly new to printing in C# and am trying to find the current status of a specific printer (if it's offline, if it's out of paper, etc) before printing.
LocalPrintServer server = new LocalPrintServer();
PrintQueue printQueue = server.GetPrintQueue("EPSON WF-2540 Series");
MessageBox.Show(printQueue.IsOffline.ToString());
The code does seem to successfully find the specified printer but always sees it as online. It doesn't matter if the printer is turned on, turned off, or even unplugged (I use a direct usb connection). Does anybody have any ideas as to what can be causing this? Thank you in advance I greatly appreciate it!