PDF Blob is not showing content, Angular 2
<p>I have problem very similar to this <a href="https://stackoverflow.com/questions/21729451/pdf-blob-pop-up-window-not-showing-contnet">PDF Blob - Pop up window not showing content</a>, but I am using Angular 2. The response on question was to set responseType to arrayBuffer, but it not works in Angular 2, the error is the reponseType does not exist in type RequestOptionsArgs. I also tried to extend it by BrowserXhr, but still not work (<a href="https://github.com/angular/http/issues/83" rel="noreferrer">https://github.com/angular/http/issues/83</a>).</p>

<p>My code is:</p>

<pre><code>createPDF(customerServiceId: string) {
   console.log("Sending GET on " + this.getPDFUrl + "/" + customerServiceId);

   this._http.get(this.getPDFUrl + '/' + customerServiceId).subscribe(
       (data) =&gt; {
            this.handleResponse(data);
         });
}
</code></pre>

<p>And the handleResponse method:</p>

<pre><code>handleResponse(data: any) {
     console.log("[Receipt service] GET PDF byte array " + JSON.stringify(data));

     var file = new Blob([data._body], { type: 'application/pdf' });            
     var fileURL = URL.createObjectURL(file);
     window.open(fileURL);
 }
</code></pre>

<p>I also tried to saveAs method from FileSaver.js, but it is the same problem, pdf opens, but the content is not displayed. Thanks</p>