Print PDF Report in IE 11

我只是一个虾纸丫 提交于 2019-12-22 10:39:04

问题


As the tile suggest, I am trying to print a PDF report specifically on IE 11. The following snippet of code works will in chrome, but when it come to IE11, all hell breaks loose; nothing works. To give you a background, I am developing Angular 5 reporting application. Here the user can view, download and print the report. I was able to achieve all the above 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();

Any input is appreciated.

来源:https://stackoverflow.com/questions/50685552/print-pdf-report-in-ie-11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!