How to read and display PDF in Objective-C?
Asked
Active
Viewed 4.2k times
24
-
10you don't appear to have put any effort into asking your question... – Mitch Wheat Jun 16 '11 at 09:19
-
1Using a PDF parsing and rendering library, obviously. – Sulthan Jan 18 '13 at 12:44
-
Normal question I am asking also, whats up ? – Renetik Jan 04 '15 at 18:13
3 Answers
26
If you just want to display it, the easiest way is to load it in a UIWebView.

Morten Fast
- 6,322
- 27
- 36
-
are you able to control the height of the UIWebView, Im having problems to get that fit my entire screen on an iPhone 5 – valbu17 Jul 20 '14 at 17:16
-
Apple will stop accepting submissions of app updates that use UIWebView APIs starting from December 2020. You may see https://developer.apple.com/documentation/uikit/uiwebview for more information. – Panayot Apr 22 '20 at 11:44
10
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.
You'll find some useful code in one of my recent questions, here:
UIDocumentInteractionController crashing upon exit
Hope this helps.