开发者

How to fit PDF height in UIWebView in iPhone/iPad

开发者 https://www.devze.com 2022-12-25 21:46 出处:网络
I have a project that uses a UIWebView to display a single page PDF fil开发者_JS百科e.I would like this content to fit by height (vertically).The default is only to fit width (horizontally).Is there a

I have a project that uses a UIWebView to display a single page PDF fil开发者_JS百科e. 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号