You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

iOS PDF in iFrame (mobile safari) is a mess

Dear Apple community,


I am struggling with PDFs embedded in iFrames for a long time.


Here is a sample I created to showcase the problem.


https://lemniscus.de/pdf_print_test.html


Just open this link on desktop and mobile safari. You will immediately notice, that mobile safari does only show the first page. If you debug, you will see that the PDF is not embedded as PDF: safari is creating and showing an image instead of the real PDF.


It is impossible to scroll to further pages, and it is impossible to print the pdf (printing only prints the image, not the pdf).


If one needs to print the PDF, the PDF must be opened fullscreen (in a new tab), but this does not work if you are starting the webapp from the home screen.


There are some stackoverflow postings and some blogs commenting the issue:


https://stackoverflow.com/questions/15480804/problems-displaying-pdf-in-iframe-on-mobile-safari

https://stackoverflow.com/questions/53558808/pdf-in-iframe-only-first-page-on-iphone-ipad

https://stackoverflow.com/questions/38325655/pdf-link-showing-only-one-page-inside-iframe-ipad-only


This issue has been around for a while and is a real pain for web developers who need to preview/ print PDFs.


I already asked this question a long time ago without any solution.





iPad Pro 11-inch Wi-Fi, Cellular

Posted on Jan 9, 2019 4:08 PM

Reply

Similar questions

There are no replies.

iOS PDF in iFrame (mobile safari) is a mess

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