Making embedded PDF scrollable in iPad

后端 未结 4 1017
孤独总比滥情好
孤独总比滥情好 2020-12-08 17:17

I have a PDF embedded in HTML using the object tag. The embedded PDF is a big document and when viewed from my desktop the PDF is displayed properly with scrollbar in all th

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 17:44

    This seems to work:

    • make the object tag big enough to show the whole PDF, and
    • contain it in a div with limited height and overflow:auto -- add -webkit-overflow-scrolling in iOS 5+ for good, native scrolling.

    Here's the code I used:

    
    
      
        PDF frame scrolling test
        
        
      
      
        
    object can't be rendered

提交回复
热议问题