开发者

scale down pdf to fit in iframe in uiwebview

I have开发者_Python百科 a uiwebview that loads a iframe to display a pdf file. But only the top left corner of the pdf file i visible, I need to fit the pdf file inside then iframe, that is, I need to scale down the pdf file so that all of it is visible. I know that with webpages you can open a pdf and set the starting scale on it like this page1.pdf#zoom=25 but that doesnt work in the webview. Does anybody know what to do?


try the scalesPageToFit property (replace nameOfYourWebview with the actual variable name of your webview

nameOfYourWebview.scalesPageToFit = YES;

You should use the documentation more, there you can easily find things like that. http://developer.apple.com/iphone/library/documentation/uikit/reference/UIWebView_Class/Reference/Reference.html#//apple_ref/occ/instp/UIWebView/scalesPageToFit

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜