After encountering some challenges with printing a PDF report specifically on IE 11, I am reaching out for help. The code snippet below works perfectly in Chrome, but when it comes to IE 11, everything falls apart. Just to provide some context, I am developing an Angular 5 reporting application where users can view, download, and print reports. I have been successful in implementing all the functionalities except for printing on IE 11!
const iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = window.URL.createObjectURL(new Blob([result], { type: 'application/pdf' }));
document.body.appendChild(iframe);
iframe.contentWindow.print();
I would greatly appreciate any advice or input on this issue.