title: C# PrintDocument and Printer Status
body: <p>I am trying to get the printer status of a PointOfSale printer using the following code:</p>
  
  <pre><code>Hashtable properties = new Hashtable();
  ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win2_Printer");
  
  foreach (ManagementObject obj in searcher.Get()) {
    if (obj["name"].ToString() == printerName) {
      foreach (PropertyData data in obj.Properties) {
        if(data.Name.ToLower() = "printerstatus") {
          int printerStatus = Convert.ToInt32(data.Value);
        }
      }
    }
  }
  </code></pre>
  
  <p>Problem is, the status is either 3 (idle) or 4(printing), even when unplugged or the paper is out.</p>
  
  <p>I have read a lot of posts with this same issue, but have not found an answer. Is this correct? How else would I check the status? Any help is appreciated.</p>