Print pdf file displayed inside iframe to printer



How can I print a pdf file displayed inside iframe directly to printer from Firefox/IE?

The following code works in chrome/opera well,but not in IE and Firefox.

function printIframe(objFrame) {
    objFrame.focus();
    objFrame.print();
}
<iframe  id="pdfreport"
name="pdfreport" src="1.pdf" width="100%;" height="80%">
</iframe>
<button type="button" style="float: right" name="btnprint"
onclick='printIframe(pdfreport);'>Print</button>


Related to : Print pdf file displayed inside iframe to printer

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .