For some reason, the Safari browser for iPad does not process embedded PDF files. PDF files are perfectly visible when run offline, but not with an object tag. The problem is that they do not scroll.
I have a jquery page with a built-in pdf that scrolls nicely on mozilla and chrome, but on safari (iPad) the PDF remains stuck on the first page and doesn't scroll. The question is, how do I make this work in the iPad browser?
A similar question was posted here. Embedding PDF firmware in the iPad , but the answer is not very good. They cheat using a height of 10,000 pixels, which creates a lot of spaces for a small document and may not work for a very large document:
<!DOCTYPE html> <html> <head> <title>PDF frame scrolling test</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <style> #container { overflow: auto; -webkit-overflow-scrolling: touch; height: 500px; } object { width: 500px; height: 10000px } </style> </head> <body> <div id="container"> <object id="obj" data="my.pdf" >object can't be rendered</object> </div> </body> </html>
Any way to do this without hard coding crazy heights?
jquery html pdf ipad
chrisnova10 Apr 6 '13 at 18:32 2013-04-06 18:32
source share