title: Print PDF from BLOB
body: <p>Im getting a PDF file from and external API, using this code I can download the file correctly:</p>
  <pre><code>var req = new XMLHttpRequest();
      req.open(&quot;POST&quot;, url, true);
      req.responseType = &quot;blob&quot;;
      req.setRequestHeader(&quot;Content-type&quot;, &quot;application/x-www-form-urlencoded&quot;);
      req.send(data);
  
      req.onload = function (event) {
         var blob = req.response;
         var link=document.createElement('a');
         link.href=window.URL.createObjectURL(blob);
         link.download=&quot;receipt_&quot; + new Date() + &quot;.pdf&quot;;
         link.click();
      };
  </code></pre>
  <p><strong>But what I really need is to print the file without open it</strong>, I tried something like</p>
  <pre><code>window.open(window.URL.createObjectURL(blob));
  window.print();
  </code></pre>
  <p>But when do this way the file does not show correctly, It shows something like this:</p>
  <pre><code>PDF-1.7
  %����
  6 0 obj
  &lt;&lt; /Type /Page /Parent 1 0 R /LastModified (D:20201027223421-03'00') ... bla bla
  </code></pre>
  <p>Thanks in advance!</p>