I've made a sample of the code I've been using on my site for a while now that is now giving issues when running from IE11 and Windows 8.1.
The problem is that the Print Window does not pop up when the javascript method .print() is called anymore.
<html>
<head></head>
<body onload="window.document.getElementById('PDFDoc').print();">
<object id='PDFDoc' name='PDFDoc' type='application/pdf' data='Hello World.pdf' height="369" width="266" style="border-width:thin;border:#CCCCCC" >
</object>
</body>
</html>
I found this article that talks about something similar but was not able to use it as a fix myself.
PS: I would've uploaded the Hello World pdf but stackoverflow does not allow me to so just use any pdf to replicate the error.
In Debug mode I get the error object doesn't support property or method 'print'
I know that self.print()
works but I'm not sure how to adapt it into this code to print the pdf and not the whole html page. Are there any other ways around this?