2

I imported pdf file to iphone device using iTunes. I verified that the pdf file stored in 'root/user/media/books' path. Can i read this file in my program?

Is there any way to read the file? Please Help me.

Thanks in advance.

cyberworld
  • 694
  • 7
  • 22
  • Is your question about how to read a PDF on the iPhone, or if you will be able to access the file in that location? – sbooth Aug 27 '11 at 17:02
  • The latter. I want to view pdf file that I stored using iTunes. But I don't know the way access this file. I only know the way to read file in my program bundle. Thank for your commenting. – cyberworld Aug 29 '11 at 11:40

2 Answers2

0

Here is a guide on how to view a pdf on the screen. Here is a previous post about how to parse a pdf using CGPDFScanner. Hope that helps!

Community
  • 1
  • 1
msgambel
  • 7,320
  • 4
  • 46
  • 62
  • I only want to read and access file. I will write file on this location. But implementation for this is too difficult for me. Reading it is further problem. – cyberworld Aug 28 '11 at 01:14
  • I don't understand what you mean by "read and access file". Do you mean you want to display the pdf file, or do you want to actually parse the pdf to get access to the strings in code? – msgambel Aug 28 '11 at 04:12
  • Thank for your answering. I meant that I can read file in external(device) path, not in my program bundle. – cyberworld Aug 29 '11 at 11:49
0

The SDK doesn’t provide any access to the books (including PDFs) in the user’s media library. For your app to read a PDF that was added via iTunes, it needs to be added to your app specifically, using the iTunes file sharing malarkey (look up “UIFileSharingEnabled” for more information on that). You can file an enhancement request with Apple to try to get them to add support for accessing the user’s book library, but don’t count on it.

Noah Witherspoon
  • 57,021
  • 16
  • 130
  • 131