How to fit PDF height in UIWebView in iPhone/iPad

与世无争的帅哥 提交于 2019-12-02 01:39:51

问题


I have a project that uses a UIWebView to display a single page PDF file. I would like this content to fit by height (vertically). The default is only to fit width (horizontally). Is there any way to overcome this?


回答1:


I ran against the same problem and couldn't find a way to do it with UIWebView. If you only want to display a single PDF-page, you can pretty much take the code from Apple's ZoomingPDFViewer Example.

I took the two classes PDFScrollView and TiledPDFView and with a little adjustment for my project, I was easily able to use it to display a single PDF page.



来源:https://stackoverflow.com/questions/2577663/how-to-fit-pdf-height-in-uiwebview-in-iphone-ipad

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!