PDF embedding does not work in IE11, but it WORKS when editing HTML in the DOM Explorer (F12 - IE debugging tool)

Here is the Fiddle link " http://jsfiddle.net/Z99gr/2/ ", which is similar to my code, I created an image slider using Galleriffic. In the image slider, along with the images, I show the embedded PDF.

The Fiddle link and my image slider work fine in Chrome and Firefox, but in IE I don't load it. I am testing in IE 11

In IE, when I open " DOM Explorer (F12 - IE Debugging Tool) " and select the <div> that contains the <embed> for the PDF, it shows the code below.

  <div id="pdf"> <embed width="500" height="375" src="https://www.adobe.com/products/pdfjobready/pdfs/pdftraag.pdf" type="application/pdf"> </embed> </div> 

And when I just edit something in this HTML TAG in "DOM Explorer (F12 - IE Debugging Tool)", it loads the PDF.

This is a very strange character of this problem.

I do not understand how to fix this problem.

Please suggest!

I get below inm IE11 results:

enter image description here

Where, the results should be something like this (its screencapture from Chrome): enter image description here

+7
source share
4 answers

Now I was able to embed the IE PDF file using the <iframe> .

I replaced the <object> "and" <embed> " <iframe> tags and now it works great with all 3 browsers, Firefox, Chrome and IE.

There are two ways to embed PDF in IE.

First way: invoke PDF directly in <iframe>

Below is the updated code:

 <div id="pdf"> <iframe src="https://www.adobe.com/products/pdfjobready/pdfs/pdftraag.pdf" style="width: 100%; height: 100%;" frameborder="0" scrolling="no"> <p>It appears your web browser doesn't support iframes.</p> </iframe> </div> 

The second way: if the browser does not have a PDF reader, you can call the HTML code on the <iframe> page that contains the <object> .

Below is the code for the second option

  <div id="pdf"> <iframe src="pdf.html" style="width: 100%; height: 100%;" frameborder="0" scrolling="no"> <p>It appears your web browser doesn't support iframes.</p> </iframe> </div> 

Code for pdf.html "

 <body> <object data="lorem.pdf" type="application/pdf"> <p>It appears you don't have Adobe Reader or PDF support in this web browser. <a href="lorem.pdf">Click here to download the PDF</a>. Or <a href="http://get.adobe.com/reader/" target="_blank">click here to install Adobe Reader</a>.</p> <embed src="lorem.pdf" type="application/pdf" /> </object> </body> 

It worked for me!

Here is a WORKING script: http://jsfiddle.net/Z99gr/9/

Hope it will be useful for others in the future!

+21
source

Found fix that worked for me ...

I used the IE11 server, Win7 and the latest version of Adobe Reader XI, which I just updated.

On the website I came across, I used <object > </object > to input the embedded PDF (it was a CQ5 component, if that matters).

I did not need to change the html - this is what I did:

1) Go to internet settings in IE

2) Go to Advanced

3) Click "Reset ...". I also clicked "delete personal settings", since I mainly use IE to test web development, so there is not much ...

4) A computer restart is required, so do it.

5) When you return, open IE11.

6) It will tell you if you want to use the default settings / accelerators. I said YES (I usually always said NO to this, in the past).

7) Open the site and enjoy the success.

He also installed this site for me, so I know something good happened. http://acroeng.adobe.com/Test_Files/browser_tests/embedded/embed2.html

I tried to fix the "TabProcGrowth" fix in the registry (some other solution that I found earlier), but that didn't work either. Only rebooting IE for the kiss worked for me.

0
source

Anyone with these issues in the future should turn off compatibility mode for intranet sites.

Tools> Compatibility View Options> Uncheck "Display intranet sites in compatibility view"

Developer tools override compatibility view and render page in IE11. Compatibility makes the page display as IE5

0
source

Solution : Install Adobe Acrobat Reader.

It seems to me that IE uses any installed reader to view embedded or open PDF files, while Chrome, Edge and other modern browsers come with PDF viewers.

0
source

All Articles