title: How to read pdf file from document directory in iPhone?
body: <p>Currently i am working in iPhone application, i have an pdf file in resource folder (Local pdf file) then i read that pdf file (paper.pdf) successfully, below i have mentioned read local pdf file for your reference.</p>
  
  <p>Example:</p>
  
  <pre><code>CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("paper.pdf"), NULL, NULL);
  pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
  CFRelease(pdfURL);
  </code></pre>
  
  <p>Then i have tried to store pdf file (from URL) in NSDocument directory, stored successfully.</p>
  
  <pre><code>NSData *pdfData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.msy.com.au/Parts/PARTS.pdf"]];
  
   NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); 
   NSString *documentsDirectory = [paths objectAtIndex:0]; 
   NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"myPDF11.pdf"];
   [pdfData writeToFile:filePath atomically:YES];
  </code></pre>
  
  <p>Then i tried read that pdf file (from NSDocument directory) but i didn't know that, please help me.</p>
  
  <p>Thanks in Advance</p>