How to display a PDF in Objective-C? [closed]

爱⌒轻易说出口 提交于 2019-11-26 19:24:46

问题


How to read and display PDF in Objective-C?


回答1:


If you just want to display it, the easiest way is to load it in a UIWebView.




回答2:


If you want to solely read and display PDFs to users, as the Mail app does on your iOS device with all the scrolling and zooming done for you, then I would use a UIDocumentInteractionController.

http://developer.apple.com/library/ios/#documentation/uikit/reference/UIDocumentInteractionController_class/Reference/Reference.html

You'll find some useful code in one of my recent questions, here:

UIDocumentInteractionController crashing upon exit

Hope this helps.




回答3:


Have a look at this Apple sample code for ZoomingPDFViewer (iOS Developer membership required to see this link).




回答4:


the easiset way is with the UIDocumentInteractionController

Drawback: you need a local file-url




回答5:


Please have a look at this

http://developer.apple.com/library/ios/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf/dq_pdf.html

Here they have given a good explanation.



来源:https://stackoverflow.com/questions/6369568/how-to-display-a-pdf-in-objective-c

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