How to solve Safari PDF first page problem for Apple iPhone and iPad?
Render a PDF file using your iPhone, it may seem like an easy operation but I had a bit of trouble doing it via Safari for iPhone and iPad.
Unfortunately only the first page of the PDF was shown, the rest was blocked. ????
What is the recommended way to render PDF in HTML?
- iFrame ❌
- Object ❌
- Embed ❌
- PDF.JS library ❌
- Google PDF viewer ❌
I tried all online solutions and PDF plugins but always same result:
- Desktop: Chrome, Opera, Firefox working ✅
- iOS: Safari not working ❌
So how to solve Safari PDF first page problem for Apple iPhone and iPad?
Using Javascript you can Decode base64 string, create a blob object with content-type “application/pdf” and navigates the browser to pdf.
Thanks for reading!