title: Open a PDF file in AJAX POST
body: <p>I am doing ajax POST as:</p>
  
  <pre><code>$.ajax({
      type: 'POST',
      url: rootUrl("Home/PrintInvoice/12"),
      success: function (result) {
          $("#TestInvoicePrint").empty();
          $("#TestInvoicePrint").html(result);
          window.open(result);
      }
  });
  </code></pre>
  
  <p>Where I am getting PDF file in result from MVC action as,</p>
  
  <pre><code>public ActionResult PrintInvoice(long ID)
  {
      var data = db.Documents.Where(x =&gt; x.InvoiceNumber == ID);
      ReportDocument rd = new ReportDocument();
      rd.Load(Server.MapPath("~/Reports/InvoiceDocument.rpt"));
      ConnectionInfo ConnInfo = new ConnectionInfo { ServerName = "10.0.0.154,1433\\sqlexpress", UserID = "CueReader", Password = "CueReader@123", DatabaseName = "Cue" };
  
      ParameterFieldDefinitions parmFields = rd.DataDefinition.ParameterFields;
      ParameterValues pvals = new ParameterValues();
  
      rd.ParameterFields["DocumentID"].CurrentValues.IsNoValue = true;
  
      Stream stream = rd.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);
      stream.Seek(0, SeekOrigin.Begin);
  
      return new FileStreamResult(stream, "application/pdf");              
  }
  </code></pre>
  
  <p>How can I use the PDF file into my DOM Element from ajax POST?</p>