问题
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