0

I do not want to display a pdf from a webpage, I want the user to be able to import pdfs ,perhaps from ibooks, into my app and display them. If i download the pdf (via email or other sources) how do i navigate to the actual pdf file on my phone? What is the appropriate method of displaying the pdf: via webview or through utilizing UIDocumentationInteraction Controllers? And lastly, how would I programatically store pdfs in my app directory? So when someone opens up an email with the pdf, they can choose to open it up in my app and have it stored there? Sorry I am really new to iOS and any suggestions are appreciated

CoderNinja
  • 571
  • 3
  • 7
  • 20
  • If it's like any other OS, the user will have to have a PDF reader installed. Unless, you want to write your own. – durbnpoisn Apr 22 '14 at 18:14

1 Answers1

0

I recommend you use one of apple's examples: https://developer.apple.com/library/ios/samplecode/ZoomingPDFViewer/Listings/Classes_TiledPDFView_h.html ... but be wary of memory because you have to release manually the pdf even with arc. This tutorial doesn't includes this releases therefore its incomplete... you have to use:

CGPDFDocumentRelease(thePDF); for a pdf and

CGPDFPageRelease(_PDFPage);

to release a single page

I don't remembar if this tutorial supports many pages, if not you'll have to use a UIPageViewController but I'm sure you can find other tutorials

user2387149
  • 1,219
  • 16
  • 28