Make embedded PDF scrollable in iPad

后端 未结 8 2027
刺人心
刺人心 2021-02-01 22:24

For some reason the iPad safari browser does not handle embedded PDFs well. PDFs view fine on their own when launched standalone, but not with the object tag. The problem is t

8条回答
  •  你的背包
    2021-02-01 23:00

    You don't need to set the height of the object to something crazy, just set it so the same height as your container element. To scroll using the hopeless Safari rendering object you need to use two fingers (both up/down and left/right).

    I also have this properties set up in my container element:

    overflow: scroll;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    display: -webkit-box;
    

    Something I couldn't achieve was to get it fill the width on the container, but at least you can navigate through the document.

提交回复
热议问题