title: PrintQueue.AddJob hangs when printing to non-xps based printers
body: <p>I am trying to print an xps document to printers (network printer, some virtual local printers, xps and non xps based) with the following code.</p>
  
  <p><strong>C# Source:</strong></p>
  
  <pre><code>static void Main(string[] args)
  {
      PrintServer printServer = new PrintServer(@"\\printserver.csez.zohocorpin.com");
      foreach (PrintQueue queue in printServer.GetPrintQueues())
      {
          Console.WriteLine("Printer: {0}, Port: {1}, ShareName: {2}, status: {3}, PrintingIsCancelled: {4}", 
              queue.Name, queue.QueuePort.Name, queue.ShareName, queue.QueueStatus, queue.PrintingIsCancelled);
          Program program = new Program();
  
          Thread printingThread = new Thread(() =&gt; program.Print_XPXFile(queue, @"D:\Assist\RemotePrint\Spool\Donalduck.xps"));
          // Set the thread that will use PrintQueue.AddJob to single threading.
          printingThread.SetApartmentState(ApartmentState.STA);
  
          printingThread.Start();
          printingThread.Join();
      }
  }
  
  public void Print_XPXFile(PrintQueue pQueue, String FilePath)
  {
      // Create print server and print queue.
      bool fastCopy = pQueue.IsXpsDevice;
      FileInfo file = new FileInfo(FilePath);
  
      if (!file.Exists)
      {
          Console.WriteLine("There is no such file.");
      }
      else
      {
          Console.WriteLine("Adding {0} to {1} queue. share name : {2}", FilePath, pQueue.Name, pQueue.ShareName);
  
          try
          {
              // Print the Xps file while providing XPS validation and progress notifications.
              PrintSystemJobInfo xpsPrintJob = pQueue.AddJob(file.Name, FilePath, fastCopy);
              Console.WriteLine("Done adding.");
          }
          catch (PrintJobException e)
          {
              Console.WriteLine("\n\t{0} could not be added to the print queue.", file.Name);
              if (e.InnerException.Message == "File contains corrupted data.")
              {
                  Console.WriteLine("\tIt is not a valid XPS file."); // Use the isXPS Conformance Tool to debug it.
              }
              else
              {
                  Console.WriteLine("\tmessage : {0}", e.InnerException.Message); 
              }
          }
      }
  }
  </code></pre>
  
  <p>When printing to Microsoft XPS Document Writer, Microsoft Print to PDF, etc it works fine.</p>
  
  <p>I found that it is working fine with all <strong><code>XPS based printers</code></strong>. I even installed a XPS sample printer driver and added a virtual local printer to confirm this claim and as expected it worked.</p>
  
  <p>For <strong>non-xps based printers</strong>, it actually gets stuck in the AddJob function. It neither throws any exception, nor it moves to the next statement.</p>
  
  <p>I developed the code based on <a href="https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanced/how-to-programmatically-print-xps-files" rel="noreferrer">this</a> msdn resource.</p>
  
  <p>What is the cause and solution?</p>
  
  <p>All thoughts are welcome.</p>