I've found that Internet Explorer won't allow for print() on iframes. So you need to use mywindow.document.execComand('print',false,null);
However, this stops it from working in Firefox.
If you only need to support IE and Chrome (have tested both work), you can use the following replacing line 176;
html.push('<script type="text/javascript">function printPage(){var printed=false;focus();if(this.document.execCommand){this.document.execCommand("print",false,null);printed=true;}if(!printed){print();}' + ((!opts["leaveOpen"] && opts["printMode"].toLowerCase() == 'popup') ? 'close();' : '') + '}</script>');
(Super late to the party here)
I've found that Internet Explorer won't allow for
print()
on iframes. So you need to use mywindow.document.execComand('print',false,null);However, this stops it from working in Firefox.
If you only need to support IE and Chrome (have tested both work), you can use the following replacing line 176;
html.push('<script type="text/javascript">function printPage(){var printed=false;focus();if(this.document.execCommand){this.document.execCommand("print",false,null);printed=true;}if(!printed){print();}' + ((!opts["leaveOpen"] && opts["printMode"].toLowerCase() == 'popup') ? 'close();' : '') + '}</script>');