title: How to get the printer status in WPF?
body: <p>Here is how I print my flowdocument:</p>
  
  <pre><code>PrintDialog pd = new PrintDialog();
  LocalPrintServer local = new LocalPrintServer();
  PrintQueue pq = local.DefaultPrintQueue;//GetPrintQueue("[Printer Name]"); //e.g. local.GetPrintQueue("Microsoft XPS Document Writer");
  pd.PrintQueue = pq;
  PrintTicket pt = pq.DefaultPrintTicket;
  pt.PageMediaSize = new PageMediaSize(PageMediaSizeName.ISOA5);// or we can specify the custom size(width, height) here
  pd.PrintTicket = pt;
  pt.PageBorderless = PageBorderless.Borderless;
  pt.PageOrientation = PageOrientation.ReversePortrait;
  PrintCapabilities capabilities = pd.PrintQueue.GetPrintCapabilities(pd.PrintTicket);
  double sizeWidth = capabilities.PageImageableArea.ExtentWidth;
  double sizeHeight = capabilities.PageImageableArea.ExtentHeight;
  var fd = new FlowDocument();
  
  DocumentPaginator sd = ((IDocumentPaginatorSource)fd).DocumentPaginator;
  sd.PageSize = new Size(sizeWidth + 20, sizeHeight);
  pd.PrintDocument(sd, "My Doc");
  // GET THE PRINTER STATUS IN MESSAGE BOX HERE..
   MessageBox.Show(printerStatus());  // printerStatus() is a pseudo method to retrieve the status of the printer.
  </code></pre>
  
  <p>How can i get the current status of the printer so that it will output, Printing, Out of Paper, Paper jam, Printer Offline, etc message????</p>
  
  <p>Upon searching, I came across this page: <a href="http://msdn.microsoft.com/en-us/library/system.printing.printqueuestatus.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.printing.printqueuestatus.aspx</a></p>
  
  <p>However I have no clue on it's usage. Can you any body help me to get in with it?</p>
  
  <p>This print process is being running in a STA thread.</p>