Hi!
I need to open a PDF in IE9 that I'm getting as a stream from a POST request.
This is the code that I've right now and when I run it on IE9, I get an error saying that Blob is undefined (I'm using AngularJS, but I think that isn't because of that):
var blob = new Blob([response.data], {type: 'application/pdf'});
var fileURL = $window.URL.createObjectURL(blob);
$window.open(fileURL, '_blank');
$window.URL.revokeObjectURL(fileURL);
I saw that BlobBuilder was used for older versions so I tried that:
var BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder ||
window.MozBlobBuilder || window.MSBlobBuilder;
var bb = new BlobBuilder ();
bb.append(response.data);
blob = bb.getBlob('application/pdf');
But it seems that this object doesn't exists for IE9 either, only starting from IE10.
Anyone knows a way to do that on IE9?
Thanks!!