Newsroom Update

Apple is introducing a new Apple Watch Pride Edition Braided Solo Loop, matching watch face, and dynamic iOS and iPadOS wallpapers as a way to champion global movements to protect and advance equality for LGBTQ+ communities. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Safari in iOS 8.0 can not display a PDF embedded in a HTML page(with embed tag).

Safari in iOS 8.0 can not display a PDF embedded in a HTML page(with embed tag).

In iOS7.0 or earlier Safari can display the PDF if it is embedded in a HTML page.


demo page:

http://www.broadband-xp.com/test/ios/embed.html


Steps to Reproduce:

1. In iOS 8.0 with Safari access to the following test page:

http://www.broadband-xp.com/test/ios/embed.html


You will not see a PDF there.


2. In iOS 7.0 or earlier with Safari access to the same page.

Then you will see a PDF.


Is this change a bug or an expected behavior?

iPhone 5, iOS 8

Posted on Sep 19, 2014 2:51 PM

Reply
Question marked as Best reply

Posted on Sep 22, 2014 11:10 AM

This issue happens in Safari in iOS 8 because it now uses WKWebView. Applications (web browsers) that still use UIWebView will continue to render the PDF document in an <embed> tag.


Instead of using the <embed> tag to render the first page of the PDF document, a better approach would be to use an <img> tag. Another alternative would be to use an <iframe> to render the PDF, although (in Safari on iOS 8) there is another bug that only renders the first page of a multi-page PDF document inside an <iframe>: After iOS8 upgrade, safari can't display PDF in iframes again

16 replies

Safari in iOS 8.0 can not display a PDF embedded in a HTML page(with embed tag).

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.