title: ASP.NET MVC AJAX Open PDF with parameters
body: <p>I am using ASP.NET MVC and I built a controller returning a PDF file.<br>
  I build the PDF with PDFsharp:</p>
  
  <pre><code>public ActionResult GenerateReport(string Param)
  { 
      // Create a new PDF document
      PdfDocument document = new PdfDocument();
      document.Info.Title = "Created with PDFsharp";
  
      // Create an empty page
      PdfPage page = document.AddPage();
  
      // Get an XGraphics object for drawing
      XGraphics gfx = XGraphics.FromPdfPage(page);
  
      // Create a font
      XFont font = new XFont("Verdana", 20, XFontStyle.BoldItalic);
  
      // Draw the text
      gfx.DrawString("Hello, World!", font, XBrushes.Black,
      new XRect(0, 0, page.Width, page.Height),
      XStringFormats.Center);
  
      MemoryStream stream = new MemoryStream();
      document.Save(stream, false);
      byte[] bytes = stream.ToArray();
  
      return File(bytes, "application/pdf");
  }
  </code></pre>
  
  <p>Now my goal is to send an AJAX request from jQuery and open the PDF file in a new tab. Besides that I want to pass a parameter to the controller.</p>