UIWebView With PDF

 ̄綄美尐妖づ 提交于 2019-12-05 19:39:31

I don't think this will help much, but I think your best option is to render the PDF to an image (of decent DPI) and show the image instead. I do this for an app, but we do that server side using ImageMagick - don't know how you might do that in obj-c. Also note that a mostly-text PDF will be much larger (filesize) when rasterized.

However, you might also try to embed the PDF in HTML page and load that HTML in the WebView - that may at least avoid the gray border/artboard.

webView.transform = CGAffineTransformScale( webView.transform, 1.25, 1.25 );

2 - Checking the Scale Pages to Fit box in IB sorted this for me

I would also like to know the answer to 1. I guess you want to know how to display the PDF in the same way as when opening as attachment in mail, where the navigation bar only appears on a tap and the status bar also disappears?

Where has CGAFFineTransformScale been all my life?

Seriously, that is a big help. However, it worked better applying it to webView.scrollView.

Finally, is there a similar command to change the offset of the content as well as the scale?

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