1

This is the code i used to print the pdf inside and iframe. But in Firefox its not even responding. No error in firebug. In chrome its working fine. Please help me.

<html>
    <head>
        <script type="text/javascript">
        function Printpd(pdf)
        {
                pdf.focus();
                pdf.print();
        }
        </script>
    </head>

    <body>
            <iframe name="myFrame" id="myFrame" width="600" height="400" src="uploadedfiles/DPA%20Quick%20Reference%20Guide.pdf""></iframe>

            <input type="button" value="Print IFRAME" onclick="Printpd(myFrame);" />
    </body>
</html>
Sid
  • 29
  • 2
  • 4

1 Answers1

0

This will resolve the IFrame reference, it won't solve your printing issue, see link from @Nikki9696 for that:

<input type="button" value="Print IFRAME" 
        onclick="Printpd(document.getElementById('myFrame'));" />
rick schott
  • 21,012
  • 5
  • 52
  • 81