we are working in react application, in that we want to show the pdf content in new tab for all the browsers. below code working fine in all browsers except IE11. in IE11 we are getting "Access Denied " message error. i referred lot of links but no luck
const binary = atob(response.content.value.replace(/\s/g, ''));
const len = binary.length;
const buffer = new ArrayBuffer(len);
const view = new Uint8Array(buffer);
for (let i = 0; i < len; i++) {
view[i] = binary.charCodeAt(i);
}
const blob = new Blob([view], { type: "application/pdf" });
const url = URL.createObjectURL(blob);
//url will be "blob:888-ggg-ggggasdsad"
window.open(url, "_blank");
we are using typescript in react application. above code opening pdf in chrome browser. but in IE11 it is throwing access denied error. we don't want to use iframe like below links,
Displaying Blob PDF in Edge/IE11 IE how to open blob object in new Tab
Is there anyother way of achieving this functionality to open the PDF content in IE11.