Community Forum

Print is not working in Internet Explorer.

Profile Image 1 Posts 1 Karma
withu.sunil posted this 25 January 2018

Hi,

I have an issue with printing a file even after installing MeadCo HTML printing and MeadCo Security Manager in IE.

I have a URL "https://[myUrl]" which gives me a pdf file with some information. I tried so many different ways to pop up the new window rendering the pdf file from the URL provided and at the same time send that pdf to my default printer. But it never worked as expected. Here is the code that i tried:

First I tried like this, but didn't work

==============================================================================================

<html>

          <object id="factory" style="display:none"

                   classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"

                   codebase="https://[myUrl]">

</object>

<script>

function btn_print_onclick() {

  factory.printing.Print(false);

}

</script>

<body>

<button onclick="btn_print_onclick()">Print report</button>

</body>

 

</html>

====================================================================================================

Again i tried this way:

===================================================================================================

<html>

<script>

function print_label() {

var myWindow = window.open('https://[myUrl]','','width=800,height=600');

if (navigator.appName == 'Microsoft Internet Explorer') window.print();

else myWindow.print();

}

</script>

<body>

<button onclick='print_label()'>Print report</button>

</body>

</html>

In this case it tries to download or save the file but never poped up the new window with the pdf file that i was expecting and never sent the file to printer.

Your help is greately appreciated.

 

Thank you 

 

Profile Image 185 Posts 185 Karma
Jerry posted this 26 January 2018