I cannot scroll a pdf called inside a frame in iPad Safari
<frame src="ebook.pdf" title="Content Frame" name="content" id="content"
frameborder="0" border="0" noresize scrolling="yes" marginwidth="0" marginheight="0"
noresizescrolling="AUTO" framespacing="0" />
I have already tried 2 things:
- 2-finger scroll
- Using object/embed instead of frame
But this does not work.
In fact I have tried a lot of things...overflow, height, etc..
开发者_开发百科Please help me. Thank you in advance.
According to this article http://support.apple.com/kb/ht1484 you cannot scroll anything inside a frame when using Safari on the iPad. The frames always get resized to fit their content (this also applies to iframes). To do this, Safari even dismisses the values for "cols" or "rows" you made in the frameset-tag and seems to use whatever value is needed. Unfortunately, the frame does not resize properly for PDFs so they get cut off.
I think your best choice might be to link the pdf directly...
I think the problem is that you are trying to display a PDF. The 2-finger swipe approach should work for regular HTML frames.
One option is to use Google Docs Viewer (http://docs.google.com/viewer) in your application.
You could hide empty divs at certain positions in the frame, and use jQuery to scroll to those positions. So the user wouldn't be able to scroll the frame, but they could click navigation which would move the frame to the pproper section.
Have you tried the Ext JS 4 JavaScript Framework? On their forum they speak of the possibility to show a PDF in a panel. The forum thread contains example code. The solution is not specific to iPad but I hear that in general Ext JS works very well on iPad. Anyone else have experience with this framework?
I have noticed when browsing StackOverflow on an IPad that any code in a frame that scrolls outside visible is not accessible. I think it may simply be a limitation of Safari on the IPad / IPhone
精彩评论