title: Downloaded PDF looks empty although it contains some data
body: <p>I'm trying to implement a PDF file download functionality with JavaScript.<br>
  As a response to a <code>POST</code> request I get a PDF file, in Chrome DevTools console it looks like (the <code>oResult</code> data container, fragment):</p>
  
  <blockquote>
    <p>"%PDF-1.4↵%����↵4 0 obj↵&lt;>stream↵x��</p>
  </blockquote>
  
  <p>Now I'm trying to initialize the download process:</p>
  
  <pre class="lang-js prettyprint-override"><code>let blob = new Blob([oResult], {type: "application/pdf"});
  
  let link = document.createElement('a');
  
  link.href = window.URL.createObjectURL(blob);
  link.download = "tstPDF";
  
  link.click();
  </code></pre>
  
  <p>As a result, upon a click on a button I get <em>tstPDF.pdf</em>, it contains the correct number of pages, but the PDF itself is empty, no content is displayed, although it is 6 KB.</p>
  
  <p>When I test the Java server-side module, which generates the PDF, everything is working fine, it sends <code>InputStream</code> through <code>ServletOutputStream</code>. Thus I assume that the issue is somewhere on a client side, perhaps something with <code>MIME</code>, <code>BLOB</code>, <code>encoding</code>, or similar.</p>
  
  <p>Do you have any idea why the generated PDF doesn't display any data?</p>