Printing of PDF file using inline frame in an HTML page is not working in IE but working fine in GoogleChrome. RRS feed

  • General discussion

  • Hi,

     Iam using JDev11. version.

    I created one html page and used one inline frame which loads a Pdf document as below.

            src = "pdfdocument" width ="500" height ="500" id="CcPreviewIF" frameborder="0">

     iam having one command button and script has to be executes on button click

    <button type="button" onclick="previewPrint() ">

    The script used is

            function previewPrint()
            var iframe =  document.getElementById("CcPreviewIF");
             alert("inLoadframe IN previewPrint :" + iframe)
                var ifWin = iframe.contentWindow || iframe;

    But iam unable to print the PDF document in InternetExplorer , but can print the document in Google Chrome. Please help me how to resolve the issue in IE.Do the needful. Thanks in advance.

    Monday, March 11, 2013 10:45 AM

All replies

  • This is the TechNet Forum for questions regarding Internet Explorer 8, 9 10 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.

    For better assistance please ask for help in the MSDN IE Development Forums.

    Thanks & Regards,

    Vincenzo Di Russo
    Microsoft® MVP Windows Internet Explorer, Windows & Security Expert - since 2003.
    Moderator in the Microsoft Community and TechNet Forums
    My MVP Profile

    Monday, March 11, 2013 10:59 AM
  • Hi,

    Since the website is created by you, it is better to post the issue in MSDN IE Development Forums as Vincenzo Di Russo said.


    Vincent Wang
    TechNet Community Support

    Tuesday, March 12, 2013 6:59 AM
  • Hi,

    embedded pdf documents are hosted in IE in an ActiveX control... the Adobe PDF Reader ActiveX. It is the activeX control that has the print methods, not the hosting iframe window.

    for browser interoperability (Chrome, FX, Opera, IE x86 IE x64 and IE EPM) you are best to place pdf documents as a hyper-link on your webpages to allow users to save them to disk for printing...

    In MSIE browsers the PDF file reader is an ActiveX control.....x64 and EPM IE do not run x86 active X controls.

    In other browsers it is a plugin....

    Instead of an iframe you could use an <object> tag... but again... this will not work in x64 browsers...since the Adobe Reader activeX is 32bit.

    The Adobe PDF reader has an option "Do not use webbrowser for PDF" which prevents PDF documents from being hosted in iframe or object tags... (on IE the PDF opens in the Adobe Reader instead of the iframe)

    from my testing the ONLY solution is to present PDF documents as a hyperlink that your users can choose to click and view with the installed PDF Reader application...

    <a href="pdfdocument.pdf" target="_blank">pdfdocument link</a> works in all browsers and in the case of x64 browsers if the Adobe Reader is configured not to use the Webbrowser then the pdf document will open in the Adobe Reader instead of the x86 Adobe Reader ActiveX control.


    there are a few complaints from end users in the answers forum about not being able to view embedded PDF documents when using the Modern IE10


    Tuesday, March 12, 2013 7:27 AM
  • from my testing the ONLY solution is to present PDF documents as a hyperlink that your users can choose to click and view with the installed PDF Reader application...

    Try Foxit?   <eg>




    Tuesday, March 12, 2013 5:40 PM