title: Failed to load PDF document (ASP.NET MVC ajax)
body: <p>I need display dynamically pdf. But I get error : Failed to load PDF document.(I use Chrome)</p>
  
  <p>Index.cshtml:</p>
  
  <pre><code>&lt;div &gt;
      &lt;h3&gt; AJAX: (data='@@Url.Action("GetPDF")')&lt;/h3&gt;
      &lt;object data='@Url.Action("GetPDF")' type="application/pdf" width="300" height="200"&gt;&lt;/object&gt;
  &lt;/div&gt;
  &lt;div&gt;
      &lt;h3&gt; PATH: (data="/Pdf/32_1.pdf")&lt;/h3&gt;
      &lt;object data="/Pdf/32_1.pdf" type="application/pdf" width="300" height="200"&gt;&lt;/object&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>HomeController.cs:</p>
  
  <pre><code>public FileStreamResult GetPDF()
  {
      string fileName = "32_1.pdf";
      FileStream fs = new FileStream(@"C:\Documents\MUH0000020\" + fileName, FileMode.Open, FileAccess.Read);
      return File(fs, "application/pdf", fileName);
  }
  </code></pre>
  
  <p>result : </p>
  
  <p><a href="https://i.stack.imgur.com/0wDkZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0wDkZ.png" alt="enter image description here"></a></p>
  
  <p>please help.</p>